def api_v2_url(path_str, params=None, base_route=website_settings.API_DOMAIN, base_prefix=api_settings.API_BASE, **kwargs):
 params = (params or {})
 base_url = furl.furl((base_route + base_prefix))
 base_url.path.add(([x for x in path_str.split('/') if x] + ['']))
 base_url.args.update(params)
 base_url.args.update(kwargs)
 return str(base_url)

def api_v2_url ( path_str , params = None , base_route = website_settings . API_DOMAIN , base_prefix = api_settings . API_BASE , ** kwargs ) : params = ( params or { } ) base_url = furl . furl ( ( base_route + base_prefix ) ) base_url . path . add ( ( [ x for x in path_str . split ( '/' ) if x ] + [ '' ] ) ) base_url . args . update ( params ) base_url . args . update ( kwargs ) return str ( base_url )
convenience function for apiv2 usage: concatenates parts of the absolute api url based on arguments provided for example: given path_str = /nodes/abcd3/contributors/ and params {filter[fullname]: bob} .