More specific error message
[shpub.git] / src / shpub / Command / Repost.php
index 3c39178c84af83cda21e45a84cac6f2611fa5fb0..4154b2d22992c5f78bfea4d7cc5ec03f04e93885 100644 (file)
@@ -6,6 +6,7 @@ class Command_Repost extends Command_AbstractProps
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('repost');
+        $cmd->description = 'Create a repost';
         static::optsGeneric($cmd);
         $cmd->addArgument(
             'url',
@@ -24,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();