protected function buildUri($endpoint, $options = [])
    {
        if ($this->token !== '') {
            $options['auth'] = $this->token;
        }

        return $this->base.'/'.ltrim($endpoint, '/').'.json?'.http_build_query($options, '', '&');
    }
protected function buildUri($endpoint, $options = [])
    {
        if ($this->token !== '') {
            $options['auth'] = $this->token;
        }

        return $this->base.'/'.ltrim($endpoint, '/').'.json?'.http_build_query($options, '', '&');
    }
protected function buildUri ( $ endpoint , $ options = [ ] ) { if ( $ this -> token !== '' ) { $ options [ 'auth' ] = $ this -> token ; } return $ this -> base . '/' . ltrim ( $ endpoint , '/' ) . '.json?' . http_build_query ( $ options , '' , '&' ) ; }
Create a standard uri based on the end point
and add the auth token.

@param string $endpoint The sub endpoint
@param array  $options  Extra options to be added

@return string
Create a standard uri based on the end point and add the auth token .