Changeset View
Changeset View
Standalone View
Standalone View
src/applications/owners/conduit/OwnersQueryConduitAPIMethod.php
<?php | <?php | ||||
final class OwnersQueryConduitAPIMethod extends OwnersConduitAPIMethod { | final class OwnersQueryConduitAPIMethod extends OwnersConduitAPIMethod { | ||||
public function getAPIMethodName() { | public function getAPIMethodName() { | ||||
return 'owners.query'; | return 'owners.query'; | ||||
} | } | ||||
public function getMethodDescription() { | public function getMethodDescription() { | ||||
return 'Query for packages by one of the following: repository/path, '. | return 'Query for packages by one of the following: repository/path, '. | ||||
'packages with a given user or project owner, or packages affiliated '. | 'packages with a given user or project owner, or packages affiliated '. | ||||
'with a user (owned by either the user or a project they are a member '. | 'with a user (owned by either the user or a project they are a member '. | ||||
'of.) You should only provide at most one search query.'; | 'of.) You should only provide at most one search query.'; | ||||
} | } | ||||
public function defineParamTypes() { | protected function defineParamTypes() { | ||||
return array( | return array( | ||||
'userOwner' => 'optional string', | 'userOwner' => 'optional string', | ||||
'projectOwner' => 'optional string', | 'projectOwner' => 'optional string', | ||||
'userAffiliated' => 'optional string', | 'userAffiliated' => 'optional string', | ||||
'repositoryCallsign' => 'optional string', | 'repositoryCallsign' => 'optional string', | ||||
'path' => 'optional string', | 'path' => 'optional string', | ||||
); | ); | ||||
} | } | ||||
public function defineReturnType() { | protected function defineReturnType() { | ||||
return 'dict<phid -> dict of package info>'; | return 'dict<phid -> dict of package info>'; | ||||
} | } | ||||
public function defineErrorTypes() { | protected function defineErrorTypes() { | ||||
return array( | return array( | ||||
'ERR-INVALID-USAGE' => | 'ERR-INVALID-USAGE' => | ||||
'Provide one of a single owner phid (user/project), a single '. | 'Provide one of a single owner phid (user/project), a single '. | ||||
'affiliated user phid (user), or a repository/path.', | 'affiliated user phid (user), or a repository/path.', | ||||
'ERR-INVALID-PARAMETER' => 'parameter should be a phid', | 'ERR-INVALID-PARAMETER' => 'parameter should be a phid', | ||||
'ERR_REP_NOT_FOUND' => 'The repository callsign is not recognized', | 'ERR_REP_NOT_FOUND' => 'The repository callsign is not recognized', | ||||
); | ); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 119 Lines • Show Last 20 Lines |