#NEWLINE# def get_domain_portal_ids( self ) : #NEWLINE# #INDENT# '\n            Gets the list of Portal ids.\n\n            http://docs.exosite.com/portals/#list-portal-by-domain\n        ' #NEWLINE# headers = { #NEWLINE# #INDENT# 'User-Agent' : self . user_agent ( ) , #NEWLINE# 'Host' : self . domain ( ) , #NEWLINE# 'Accept' : '*/*' , #NEWLINE# #UNINDENT# } #NEWLINE# headers . update ( self . headers ( ) ) #NEWLINE# r = requests . get ( ( self . portals_url ( ) + '/portals' ) , headers = headers , auth = self . auth ( ) ) #NEWLINE# if ( HTTP_STATUS . OK == r . status_code ) : #NEWLINE# #INDENT# return [ _id [ 'id' ] for _id in r . json ( ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# print ( 'get_user_portals: Something went wrong: <{0}>: {1}' . format ( r . status_code , _id . reason ) ) #NEWLINE# r . raise_for_status ( )