@staticmethod<EOL><INDENT>def construct_api_url(api_url, **params):<DEDENT>
querystring = []<EOL>params, _ = _transparent_params(params or {})<EOL>params = requests.utils.to_key_val_list(params)<EOL>for (k, v) in params:<EOL><INDENT>querystring.append(<EOL>'<STR_LIT>' % (Twython.encode(k), quote_plus(Twython.encode(v)))<EOL>)<EOL><DEDENT>return '<STR_LIT>' % (api_url, '<STR_LIT:&>'.join(querystring))<EOL>
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