'Gets the url for the request.'

def get_request_url(self, path='', old_api=False, version=None, **params):

    api_base_url = (self.old_api_url if old_api else self.api_url)
    version = (version or self.version)
    if getattr(self, 'access_token', None):
        params['access_token'] = self.access_token
    if api_base_url.endswith('/'):
        api_base_url = api_base_url[:(-1)]
    if (path and path.startswith('/')):
        path = path[1:]
    url = '/'.join([api_base_url, version, path])
    return ('%s?%s' % (url, urlencode(params)))
