class Command_Repost extends Command_AbstractProps
{
- /**
- * @var Config
- */
- protected $cfg;
-
- public function __construct($cfg)
- {
- $this->cfg = $cfg;
- }
-
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('repost');
+ $cmd->description = 'Create a repost';
static::optsGeneric($cmd);
$cmd->addArgument(
'url',
}
$req = new Request($this->cfg->host, $this->cfg);
- $req->req->addPostParameter('h', 'entry');
- $req->req->addPostParameter('repost-of', $url);
+ $req->setType('entry');
+ $req->addProperty('repost-of', $url);
$this->handleGenericOptions($cmdRes, $req);
$res = $req->send();