3 final class ManiphestInfoConduitAPIMethod
extends ManiphestConduitAPIMethod
{
5 public function getAPIMethodName() {
6 return 'maniphest.info';
9 public function getMethodDescription() {
10 return pht('Retrieve information about a Maniphest task, given its ID.');
13 public function getMethodStatus() {
14 return self
::METHOD_STATUS_FROZEN
;
17 public function getMethodStatusDescription() {
19 'This method is frozen and will eventually be deprecated. New code '.
20 'should use "maniphest.search" instead.');
23 protected function defineParamTypes() {
25 'task_id' => 'required id',
29 protected function defineReturnType() {
30 return 'nonempty dict';
33 protected function defineErrorTypes() {
35 'ERR_BAD_TASK' => pht('No such Maniphest task exists.'),
39 protected function execute(ConduitAPIRequest
$request) {
40 $task_id = $request->getValue('task_id');
42 $task = id(new ManiphestTaskQuery())
43 ->setViewer($request->getUser())
44 ->withIDs(array($task_id))
45 ->needSubscriberPHIDs(true)
46 ->needProjectPHIDs(true)
49 throw new ConduitException('ERR_BAD_TASK');
52 return $this->buildTaskInfoDictionary($task);