Add "json" option
[shpub.git] / src / shpub / Command / Reply.php
index b67d46b23b42bfdb7ee69671bee6d3f998b0f5af..6b3bc94cd336238cd2479af242b304b847804103 100644 (file)
@@ -3,16 +3,6 @@ namespace shpub;
 
 class Command_Reply extends Command_AbstractProps
 {
-    /**
-     * @var Config
-     */
-    protected $cfg;
-
-    public function __construct($cfg)
-    {
-        $this->cfg = $cfg;
-    }
-
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('reply');
@@ -42,9 +32,9 @@ class Command_Reply extends Command_AbstractProps
         }
 
         $req = new Request($this->cfg->host, $this->cfg);
-        $req->req->addPostParameter('h', 'entry');
-        $req->req->addPostParameter('content', implode(' ', $cmdRes->args['text']));
-        $req->req->addPostParameter('in-reply-to', $url);
+        $req->setType('entry');
+        $req->addProperty('content', implode(' ', $cmdRes->args['text']));
+        $req->addProperty('in-reply-to', $url);
 
         $this->handleGenericOptions($cmdRes, $req);
         $res = $req->send();