Determine URL file type from path, strip query parameters first
[shpub.git] / src / shpub / Command / Like.php
index 65020dc04cd832f57e8d6cc95929729bcccf7486..a619f7ae08bd6e4acf1677df3f225b2a19bd06b5 100644 (file)
@@ -6,6 +6,7 @@ class Command_Like extends Command_AbstractProps
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('like');
+        $cmd->description = 'Create a like';
         static::optsGeneric($cmd);
         $cmd->addArgument(
             'url',
@@ -24,8 +25,8 @@ class Command_Like extends Command_AbstractProps
         }
 
         $req = new Request($this->cfg->host, $this->cfg);
-        $req->req->addPostParameter('h', 'entry');
-        $req->req->addPostParameter('like-of', $url);
+        $req->setType('entry');
+        $req->addProperty('like-of', $url);
 
         $this->handleGenericOptions($cmdRes, $req);
         $res = $req->send();