code: def construct_api_url(api_url, **params):
          
          querystring = []
          params, _ = _transparent_params(params or {})
          params = requests.utils.to_key_val_list(params)
          for (k, v) in params:
              querystring.append(
                  '%s=%s' % (Twython.encode(k), quote_plus(Twython.encode(v)))
              )
          return '%s?%s' % (api_url, '&'.join(querystring))
docs: Construct a Twitter API url, encoded, with parameters
  
          :param api_url: URL of the Twitter API endpoint you are attempting
          to construct
          :param \*\*params: Parameters that are accepted by Twitter for the
          endpoint you're requesting
          :rtype: string
  
          Usage::
  
            >>> from twython import Twython
            >>> twitter = Twython()
  
            >>> api_url = 'https://api.twitter.com/1.1/search/tweets.json'
            >>> constructed_url = twitter.construct_api_url(api_url, q='python',
            result_type='popular')
            >>> print constructed_url
            https://api.twitter.com/1.1/search/tweets.json?q=python&result_type=popular