X-Git-Url: https://git.cweiske.de/shpub.git/blobdiff_plain/c6fd5d2f91a31c5014c2d40276b8d4ef771fb9a9..6c791f2d0c159d56c570802c8d9bd3612262aa9e:/src/shpub/Command/Bookmark.php diff --git a/src/shpub/Command/Bookmark.php b/src/shpub/Command/Bookmark.php index e25365c..4d30cec 100644 --- a/src/shpub/Command/Bookmark.php +++ b/src/shpub/Command/Bookmark.php @@ -6,6 +6,8 @@ class Command_Bookmark extends Command_AbstractProps public static function opts(\Console_CommandLine $optParser) { $cmd = $optParser->addCommand('bookmark'); + $cmd->description = 'Create a bookmark'; + static::addOptHtml($cmd); static::optsGeneric($cmd); $cmd->addArgument( 'url', @@ -32,11 +34,11 @@ class Command_Bookmark extends Command_AbstractProps } $req = new Request($this->cfg->host, $this->cfg); - $req->req->addPostParameter('h', 'entry'); - $req->req->addPostParameter('bookmark-of', $url); + $req->setType('entry'); + $req->addProperty('bookmark-of', $url); if ($cmdRes->args['text']) { - $req->req->addPostParameter('content', $cmdRes->args['text']); + $req->addContent($cmdRes->args['text'], $cmdRes->options['html']); }