4 class Command_Note extends Command_AbstractProps
6 public static function opts(\Console_CommandLine $optParser)
8 $cmd = $optParser->addCommand('note');
9 static::optsGeneric($cmd);
15 'description' => 'Post text',
20 public function run(\Console_CommandLine_Result $cmdRes)
22 $req = new Request($this->cfg->host, $this->cfg);
23 $req->req->addPostParameter('h', 'entry');
24 $req->req->addPostParameter('content', $cmdRes->args['text']);
25 $this->handleGenericOptions($cmdRes, $req);
28 $postUrl = $res->getHeader('Location');
29 Log::info('Post created at server');