11 public function __construct($cfg)
16 public static function opts(\Console_CommandLine $optParser)
18 $cmd = $optParser->addCommand('reply');
23 'description' => 'URL that is replied to',
31 'description' => 'Reply text',
35 public function run($url, $text)
37 $url = Validator::url($url, 'url');
42 $body = http_build_query(
46 'in-reply-to' => $url,
50 $req = new Request($this->cfg->host, $this->cfg);
51 $res = $req->send($body);
52 $postUrl = $res->getHeader('Location');
53 echo "Reply created at server\n";