Differential D12380 Diff 29771 src/applications/conpherence/conduit/ConpherenceQueryThreadConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/conpherence/conduit/ConpherenceQueryThreadConduitAPIMethod.php
Show All 9 Lines | final class ConpherenceQueryThreadConduitAPIMethod | ||||
public function getMethodDescription() { | public function getMethodDescription() { | ||||
return pht( | return pht( | ||||
'Query for conpherence threads for the logged in user. '. | 'Query for conpherence threads for the logged in user. '. | ||||
'You can query by ids or phids for specific conpherence threads. '. | 'You can query by ids or phids for specific conpherence threads. '. | ||||
'Otherwise, specify limit and offset to query the most recently '. | 'Otherwise, specify limit and offset to query the most recently '. | ||||
'updated conpherences for the logged in user.'); | 'updated conpherences for the logged in user.'); | ||||
} | } | ||||
public function defineParamTypes() { | protected function defineParamTypes() { | ||||
return array( | return array( | ||||
'ids' => 'optional array<int>', | 'ids' => 'optional array<int>', | ||||
'phids' => 'optional array<phids>', | 'phids' => 'optional array<phids>', | ||||
'limit' => 'optional int', | 'limit' => 'optional int', | ||||
'offset' => 'optional int', | 'offset' => 'optional int', | ||||
); | ); | ||||
} | } | ||||
public function defineReturnType() { | protected function defineReturnType() { | ||||
return 'nonempty dict'; | return 'nonempty dict'; | ||||
} | } | ||||
public function defineErrorTypes() { | |||||
return array(); | |||||
} | |||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
$user = $request->getUser(); | $user = $request->getUser(); | ||||
$ids = $request->getValue('ids', array()); | $ids = $request->getValue('ids', array()); | ||||
$phids = $request->getValue('phids', array()); | $phids = $request->getValue('phids', array()); | ||||
$limit = $request->getValue('limit'); | $limit = $request->getValue('limit'); | ||||
$offset = $request->getValue('offset'); | $offset = $request->getValue('offset'); | ||||
$query = id(new ConpherenceThreadQuery()) | $query = id(new ConpherenceThreadQuery()) | ||||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |