X-Git-Url: https://git.cweiske.de/shpub.git/blobdiff_plain/f2ef5ad9726ed325ffb846591ed6e701a0894dee..afec87fc377ef8bafec4b7588084cca91468bd68:/src/shpub/Command/Repost.php diff --git a/src/shpub/Command/Repost.php b/src/shpub/Command/Repost.php index 2f4b46f..4154b2d 100644 --- a/src/shpub/Command/Repost.php +++ b/src/shpub/Command/Repost.php @@ -3,19 +3,10 @@ namespace shpub; class Command_Repost extends Command_AbstractProps { - /** - * @var Config - */ - protected $cfg; - - public function __construct($cfg) - { - $this->cfg = $cfg; - } - public static function opts(\Console_CommandLine $optParser) { $cmd = $optParser->addCommand('repost'); + $cmd->description = 'Create a repost'; static::optsGeneric($cmd); $cmd->addArgument( 'url', @@ -34,8 +25,8 @@ class Command_Repost extends Command_AbstractProps } $req = new Request($this->cfg->host, $this->cfg); - $req->req->addPostParameter('h', 'entry'); - $req->req->addPostParameter('repost-of', $url); + $req->setType('entry'); + $req->addProperty('repost-of', $url); $this->handleGenericOptions($cmdRes, $req); $res = $req->send();