Add upload command
[shpub.git] / src / shpub / Command / Rsvp.php
index 5ed8ecdaf5f06b2979a6264ee62f69122496a844..4e67e9b1dbc3f8858adea5f1e7426f23ab78ed57 100644 (file)
@@ -9,6 +9,7 @@ class Command_Rsvp extends Command_AbstractProps
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('rsvp');
+        static::addOptHtml($cmd);
         static::optsGeneric($cmd);
         $cmd->addArgument(
             'url',
@@ -47,11 +48,11 @@ class Command_Rsvp extends Command_AbstractProps
         }
 
         $req = new Request($this->cfg->host, $this->cfg);
-        $req->req->addPostParameter('h', 'entry');
-        $req->req->addPostParameter('in-reply-to', $url);
-        $req->req->addPostParameter('rsvp', $rsvp);
-        if ($cmdRes->args['text'] != '') {
-            $req->req->addPostParameter('content', $cmdRes->args['text']);
+        $req->setType('h', 'entry');
+        $req->addProperty('in-reply-to', $url);
+        $req->addProperty('rsvp', $rsvp);
+        if ($cmdRes->args['text']) {
+            $req->addContent($cmdRes->args['text'], $cmdRes->options['html']);
         }
         $this->handleGenericOptions($cmdRes, $req);