#NEWLINE# def call( self , method , **params ) : #NEWLINE# #INDENT# "\n        Call the DISQUS API and return the json response.\n        URLError is raised when the request failed.\n        DisqusException is raised when the query didn't succeed.\n        " #NEWLINE# url = ( method . api_url % method ) #NEWLINE# request = self . _get_request ( url , self . METHODS [ method ] , ** params ) #NEWLINE# try : #NEWLINE# #INDENT# response = urlopen ( request ) #NEWLINE# #UNINDENT# except URLError : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# response_json = json . loads ( response . read ( ) ) #NEWLINE# if ( not response_json [ 'succeeded' ] ) : #NEWLINE# #INDENT# raise DisqusException ( response_json [ 'message' ] ) #NEWLINE# #UNINDENT# return response_json [ 'message' ]