Changeset View
Changeset View
Standalone View
Standalone View
src/applications/macro/conduit/MacroQueryConduitAPIMethod.php
<?php | <?php | ||||
final class MacroQueryConduitAPIMethod extends MacroConduitAPIMethod { | final class MacroQueryConduitAPIMethod extends MacroConduitAPIMethod { | ||||
public function getAPIMethodName() { | public function getAPIMethodName() { | ||||
return 'macro.query'; | return 'macro.query'; | ||||
} | } | ||||
public function getMethodDescription() { | public function getMethodDescription() { | ||||
return 'Retrieve image macro information.'; | return 'Retrieve image macro information.'; | ||||
} | } | ||||
public function defineParamTypes() { | protected function defineParamTypes() { | ||||
return array( | return array( | ||||
'authorPHIDs' => 'optional list<phid>', | 'authorPHIDs' => 'optional list<phid>', | ||||
'phids' => 'optional list<phid>', | 'phids' => 'optional list<phid>', | ||||
'ids' => 'optional list<id>', | 'ids' => 'optional list<id>', | ||||
'names' => 'optional list<string>', | 'names' => 'optional list<string>', | ||||
'nameLike' => 'optional string', | 'nameLike' => 'optional string', | ||||
); | ); | ||||
} | } | ||||
public function defineReturnType() { | protected function defineReturnType() { | ||||
return 'list<dict>'; | return 'list<dict>'; | ||||
} | } | ||||
public function defineErrorTypes() { | |||||
return array( | |||||
); | |||||
} | |||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
$query = id(new PhabricatorMacroQuery()) | $query = id(new PhabricatorMacroQuery()) | ||||
->setViewer($request->getUser()) | ->setViewer($request->getUser()) | ||||
->needFiles(true); | ->needFiles(true); | ||||
$author_phids = $request->getValue('authorPHIDs'); | $author_phids = $request->getValue('authorPHIDs'); | ||||
$phids = $request->getValue('phids'); | $phids = $request->getValue('phids'); | ||||
$ids = $request->getValue('ids'); | $ids = $request->getValue('ids'); | ||||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |