#NEWLINE# def build_url( self , * args , **kwargs ) : #NEWLINE# #INDENT# 'Builds a new API url from scratch.' #NEWLINE# parts = [ ( kwargs . get ( 'base_url' ) or self . base_url ) ] #NEWLINE# parts . extend ( args ) #NEWLINE# parts = [ str ( p ) for p in parts ] #NEWLINE# key = tuple ( parts ) #NEWLINE# __logs__ . info ( 'Building a url from %s' , key ) #NEWLINE# if ( key not in __url_cache__ ) : #NEWLINE# #INDENT# __logs__ . info ( 'Missed the cache building the url' ) #NEWLINE# __url_cache__ [ key ] = '/' . join ( parts ) #NEWLINE# #UNINDENT# return __url_cache__ [ key ]