#NEWLINE# def aliases( self , aliases , provider_url_template = None , cache_enabled = True ) : #NEWLINE# #INDENT# new_aliases = [ ] #NEWLINE# if ( not provider_url_template ) : #NEWLINE# #INDENT# provider_url_template = self . aliases_url_template #NEWLINE# #UNINDENT# for alias in aliases : #NEWLINE# #INDENT# ( namespace , nid ) = alias #NEWLINE# if ( namespace == 'blog' ) : #NEWLINE# #INDENT# new_alias = ( 'url' , aliases_dict ) #NEWLINE# if ( new_alias not in aliases ) : #NEWLINE# #INDENT# new_aliases += [ new_alias ] #NEWLINE# #UNINDENT# url = self . _get_templated_url ( provider_url_template , nid , 'aliases' ) #NEWLINE# response = self . http_get ( url , cache_enabled = cache_enabled ) #NEWLINE# if ( ( response . status_code == 200 ) and ( 'ID' in response . text ) ) : #NEWLINE# #INDENT# dict_of_keylists = { #NEWLINE# #INDENT# 'wordpress_blog_id' : [ 'ID' ] , #NEWLINE# #UNINDENT# } #NEWLINE# aliases_dict = provider . _extract_from_json ( response . text , dict_of_keylists ) #NEWLINE# new_alias = ( 'wordpress_blog_id' , str ( aliases_dict [ 'wordpress_blog_id' ] ) ) #NEWLINE# if ( new_alias not in aliases ) : #NEWLINE# #INDENT# new_aliases += [ new_alias ] #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return new_aliases