'optional list', 'phids' => 'optional list', 'authorPHIDs' => 'optional list', 'after' => 'optional int', 'limit' => 'optional int, default = 100', ); } public function defineReturnType() { return 'list'; } public function defineErrorTypes() { return array(); } protected function execute(ConduitAPIRequest $request) { $query = id(new PhabricatorPasteQuery()) ->setViewer($request->getUser()) ->needRawContent(true); if ($request->getValue('ids')) { $query->withIDs($request->getValue('ids')); } if ($request->getValue('phids')) { $query->withPHIDs($request->getValue('phids')); } if ($request->getValue('authorPHIDs')) { $query->withAuthorPHIDs($request->getValue('authorPHIDs')); } if ($request->getValue('after')) { $query->setAfterID($request->getValue('after')); } $limit = $request->getValue('limit', 100); if ($limit) { $query->setLimit($limit); } $pastes = $query->execute(); $results = array(); foreach ($pastes as $paste) { $results[$paste->getPHID()] = $this->buildPasteInfoDictionary($paste); } return $results; } }