Returns a string with the endpoint for the given command.

@param string $method Method for this command.

@return string
543056
protected function getEndpoint($method)
    {
        $endpoint = "destinations";
        $queryString = array();
        $page = $this->getArgument("page");
        $sortBy = $this->getArgument("sortBy");
        $order = $this->getArgument("order");
        if (!is_null($page)) {
            $queryString['page'] = $page;
            $this->delArgument("page");
        }
        if (!is_null($sortBy)) {
            $queryString['sort_by'] = $sortBy;
            $this->delArgument("sortBy");
        }
        if (!is_null($order)) {
            $queryString['order'] = $order;
            $this->delArgument("order");
        }
        if (!empty($queryString)) {
            $queryString = http_build_query($queryString);
            $endpoint .= "?$queryString";
        }
        return $endpoint;
    }
762730
protected function getBody($method)
    {
        if ($method === "get") {
            return parent::getBody($method);
        }
        $acls = array();
        foreach ($this->getArguments() as $value) {
            $acls[] = $value;
        }
        return json_encode(array("acl" => $acls));
    }
1352204
private function getCompressionMethod($method)
    {
        $compression_method = $this->getCompressionManager()->getCompressionAlgorithm($method);
        Assertion::notNull($compression_method, sprintf('Compression method "%s" not supported', $method));

        return $compression_method;
    }
793905
protected function getEndpoint($method)
    {
        $endpoint = "sounds";
        $soundId = $this->getArgument("id");
        if (!is_null($soundId)) {
            $endpoint .= "/$soundId";
            $this->delArgument("id");
        }
        $queryString = array();
        $name = $this->getArgument("name");
        if (!is_null($name)) {
            $queryString['name'] = $name;
            $this->delArgument("name");
        }
        $description = $this->getArgument("description");
        if (!is_null($description)) {
            $queryString['description'] = $description;
            $this->delArgument("description");
        }
        if (!empty($queryString)) {
            $queryString = http_build_query($queryString);
            return "$endpoint?$queryString";
        }
        return $endpoint;
    }
215706
protected function parseAction(string $action, string $method): string
    {
        if ('post' === $method) {
            return $this->getSlug().'_'.$action;
        }

        return $action;
    }
259473
public function get(string $endPoint)
    {
        $parsedEndPoint = self::parseEndPoint($endPoint);
        return $this->sendRequest($parsedEndPoint, "GET");
    }
946187
protected function getAcceptContentType($method)
    {
        // Just to make PHPMD happy.
        $method = null;
        $acceptFile = $this->getArgument("accept_file");
        if (!is_null($acceptFile)) {
            return "text/csv";
        }
        $acceptAnyFile = $this->getArgument("accept_any_file");
        if (!is_null($acceptAnyFile)) {
            return "*/*";
        }
        $acceptSoundFile = $this->getArgument("accept_sound_file");
        if (!is_null($acceptSoundFile)) {
            return "audio/mpeg";
        }
        return 'application/json';
    }
532900
protected function getEndpoint($method)
    {
        $endpoint = "credit_cards";
        $cardId = $this->getArgument("id");
        if (!is_null($cardId)) {
            $endpoint .= "/$cardId";
            $this->delArgument("id");
        }
        return $endpoint;
    }
736470
private function getURL($endpoint = null)
    {
        if (is_null($endpoint)) {
            $endpoint = $this->getEndpoint();
        } else {
            $endpoint = '/api/' . $endpoint;
        }

        return $this->config['url'] . $endpoint;
    }
1032512
public function formatMethod($method)
    {
        $method = strtoupper((string) $method);
        return isset(self::$methodsTable[$method]) ? self::$methodsTable[$method] : '0';
    }
76912
private function getFallbackHandler(string $method)
    {
        if (empty($this->fallback)) {
            return null;
        }

        $fallback   = \fallback($this->fallback);
        $interfaces = class_implements(static::class);
        foreach ($interfaces as $interface) {
            if (is_subclass_of($fallback, $interface)) {
                return [$fallback, $method];
            }
        }

        App::warning(sprintf('The %s class does not implement the %s interface', get_parent_class($fallback), JsonHelper::encode($interfaces, JSON_UNESCAPED_UNICODE)));

        return null;
    }
920199
private function getEndpoint(string $endpoint) : string
    {
        return sprintf(
            '%s/%s/%s',
            $this->config->get('serverUrl'),
            $this->config->get('apmVersion'),
            $endpoint
        );
    }
1325862
private static function makeEndpointsFromString($endpoint, $methods)
    {
        return collect($methods)->map(function ($method) use ($endpoint) {
            return [$method => $endpoint];
        })->collapse();
    }
1355761
public function getMethod ($method)
	{
		
		// Get methods
		
		$this->getMethods ();
		
		// Loop through the methods
		
		foreach ($this->methods as $obj)
		{
			
			// If the method names match return 
			
			if (strtolower ($obj->get ('name')) == strtolower ($method))
			{
				return $obj;
			}
			
		}
		
		// Return FALSE
		
		return FALSE;
		
	}
879558
public function toDocTypeString(Method $method) {
        $longestType = 0;
        $longestName = 0;
        foreach($method->getParameters() as $parameter) {
            if(strlen($parameter->getType()) > $longestType) {
                $longestType = strlen($parameter->getType());
            }
            if(strlen($parameter->getName()) > $longestName) {
                $longestName = strlen($parameter->getName());
            }
        }
        $returnVar = '	 * @param';
        $returnVar .= ' ' . $this->getType() . (str_repeat(' ', $longestType - strlen($this->getType())));
        $returnVar .= ' $' . $this->getName();
        if(strlen($this->getDescription()) > 0) {
            $returnVar .= str_repeat(' ', $longestName - strlen($this->getName())) . ' ' . $this->getDescription();
        }
        $returnVar .= "\n";
        return $returnVar;
    }
1064466
protected function getApiUrl($method) {
    static $READ_ONLY_CALLS =
      array('admin.getallocation' => 1,
            'admin.getappproperties' => 1,
            'admin.getbannedusers' => 1,
            'admin.getlivestreamvialink' => 1,
            'admin.getmetrics' => 1,
            'admin.getrestrictioninfo' => 1,
            'application.getpublicinfo' => 1,
            'auth.getapppublickey' => 1,
            'auth.getsession' => 1,
            'auth.getsignedpublicsessiondata' => 1,
            'comments.get' => 1,
            'connect.getunconnectedfriendscount' => 1,
            'dashboard.getactivity' => 1,
            'dashboard.getcount' => 1,
            'dashboard.getglobalnews' => 1,
            'dashboard.getnews' => 1,
            'dashboard.multigetcount' => 1,
            'dashboard.multigetnews' => 1,
            'data.getcookies' => 1,
            'events.get' => 1,
            'events.getmembers' => 1,
            'fbml.getcustomtags' => 1,
            'feed.getappfriendstories' => 1,
            'feed.getregisteredtemplatebundlebyid' => 1,
            'feed.getregisteredtemplatebundles' => 1,
            'fql.multiquery' => 1,
            'fql.query' => 1,
            'friends.arefriends' => 1,
            'friends.get' => 1,
            'friends.getappusers' => 1,
            'friends.getlists' => 1,
            'friends.getmutualfriends' => 1,
            'gifts.get' => 1,
            'groups.get' => 1,
            'groups.getmembers' => 1,
            'intl.gettranslations' => 1,
            'links.get' => 1,
            'notes.get' => 1,
            'notifications.get' => 1,
            'pages.getinfo' => 1,
            'pages.isadmin' => 1,
            'pages.isappadded' => 1,
            'pages.isfan' => 1,
            'permissions.checkavailableapiaccess' => 1,
            'permissions.checkgrantedapiaccess' => 1,
            'photos.get' => 1,
            'photos.getalbums' => 1,
            'photos.gettags' => 1,
            'profile.getinfo' => 1,
            'profile.getinfooptions' => 1,
            'stream.get' => 1,
            'stream.getcomments' => 1,
            'stream.getfilters' => 1,
            'users.getinfo' => 1,
            'users.getloggedinuser' => 1,
            'users.getstandardinfo' => 1,
            'users.hasapppermission' => 1,
            'users.isappuser' => 1,
            'users.isverified' => 1,
            'video.getuploadlimits' => 1);
    $name = 'api';
    if (isset($READ_ONLY_CALLS[strtolower($method)])) {
      $name = 'api_read';
    } else if (strtolower($method) == 'video.upload') {
      $name = 'api_video';
    }
    return self::getUrl($name, 'restserver.php');
  }
1031067
private static function getCalledMethod($method)
    {
        if (strpos($method, '::') !== false) {
            $methodChunks = explode('::', $method);
            $method = $methodChunks[1];
        }

        return $method;
    }