X-Git-Url: https://git.cweiske.de/shpub.git/blobdiff_plain/940e99e237daa66bbe9f5f07f5f6958dca12bd26..059c6ab77b8e63210b9afc266d62c9f543d4d7ae:/src/shpub/Command/Like.php diff --git a/src/shpub/Command/Like.php b/src/shpub/Command/Like.php index fb396be..ad19b8f 100644 --- a/src/shpub/Command/Like.php +++ b/src/shpub/Command/Like.php @@ -3,16 +3,6 @@ namespace shpub; class Command_Like extends Command_AbstractProps { - /** - * @var Config - */ - protected $cfg; - - public function __construct($cfg) - { - $this->cfg = $cfg; - } - public static function opts(\Console_CommandLine $optParser) { $cmd = $optParser->addCommand('like'); @@ -34,8 +24,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(); @@ -46,8 +36,8 @@ class Command_Like extends Command_AbstractProps Log::err($res->getBody()); exit(20); } else { - echo "Like created at server\n"; - echo $postUrl . "\n"; + Log::info('Like created at server'); + Log::msg($postUrl); } } }