private function setAuthMethod($authMethod)
    {
        switch ($authMethod) {
            case 'apikey':
                $this->curl->setHeader('X-API-KEY', $this->apiKey);
                break;

            case 'basic':
            default:
                $this->curl->setBasicAuthentication($this->apiUsername, $this->apiPassword);
                break;
        }
    }
private function setAuthMethod($authMethod)
    {
        switch ($authMethod) {
            case 'apikey':
                $this->curl->setHeader('X-API-KEY', $this->apiKey);
                break;

            case 'basic':
            default:
                $this->curl->setBasicAuthentication($this->apiUsername, $this->apiPassword);
                break;
        }
    }
private function setAuthMethod ( $ authMethod ) { switch ( $ authMethod ) { case 'apikey' : $ this -> curl -> setHeader ( 'X-API-KEY' , $ this -> apiKey ) ; break ; case 'basic' : default : $ this -> curl -> setBasicAuthentication ( $ this -> apiUsername , $ this -> apiPassword ) ; break ; } }
Set auth method for curl request

@param string "apikey" or "basic"
Set auth method for curl request