code: protected function buildUri($endpoint, $options = [])
      {
          if ($this->token !== '') {
              $options['auth'] = $this->token;
          }
  
          return $this->base.'/'.ltrim($endpoint, '/').'.json?'.http_build_query($options, '', '&');
      }
docs: 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