git.cweiske.de
/
shpub.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More specific error message
[shpub.git]
/
src
/
shpub
/
Command
/
Like.php
diff --git
a/src/shpub/Command/Like.php
b/src/shpub/Command/Like.php
index 5b456f955a56de5688d94af4e6051cf9d522b04d..a619f7ae08bd6e4acf1677df3f225b2a19bd06b5 100644
(file)
--- a/
src/shpub/Command/Like.php
+++ b/
src/shpub/Command/Like.php
@@
-3,19
+3,10
@@
namespace shpub;
class Command_Like extends Command_AbstractProps
{
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');
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('like');
+ $cmd->description = 'Create a like';
static::optsGeneric($cmd);
$cmd->addArgument(
'url',
static::optsGeneric($cmd);
$cmd->addArgument(
'url',
@@
-34,8
+25,8
@@
class Command_Like extends Command_AbstractProps
}
$req = new Request($this->cfg->host, $this->cfg);
}
$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();
$this->handleGenericOptions($cmdRes, $req);
$res = $req->send();