code: def construct_url(self):
          
          path = [self.path]
          path.extend(self.params)
  
          # Build URL
          url = self.client.base_url + '/'.join(
              str(value) for value in path
              if value
          )
  
          # Append query parameters (if defined)
          query = self.encode_query(self.query)
  
          if query:
              url += '?' + query
  
          return url
docs: Construct a full trakt request URI, with `params` and `query`.