Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / conduit / method / ConduitGetCapabilitiesConduitAPIMethod.php
blob2cb84b1f83f1535c4a71c8aba59f428d4253be48
1 <?php
3 final class ConduitGetCapabilitiesConduitAPIMethod extends ConduitAPIMethod {
5 public function getAPIMethodName() {
6 return 'conduit.getcapabilities';
9 public function shouldRequireAuthentication() {
10 return false;
13 public function getMethodDescription() {
14 return pht(
15 'List capabilities, wire formats, and authentication protocols '.
16 'available on this server.');
19 protected function defineParamTypes() {
20 return array();
23 protected function defineReturnType() {
24 return 'dict<string, any>';
27 public function getRequiredScope() {
28 return self::SCOPE_ALWAYS;
31 protected function execute(ConduitAPIRequest $request) {
32 $authentication = array(
33 'token',
34 'asymmetric',
35 'session',
36 'sessionless',
39 $oauth_app = 'PhabricatorOAuthServerApplication';
40 if (PhabricatorApplication::isClassInstalled($oauth_app)) {
41 $authentication[] = 'oauth';
44 return array(
45 'authentication' => $authentication,
46 'signatures' => array(
47 'consign',
49 'input' => array(
50 'json',
51 'urlencoded',
53 'output' => array(
54 'json',
55 'human',