#NEWLINE# def _queryForJson( self , url , params = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , http_method = 'GET' ) : #NEWLINE# #INDENT# '\n        Helper that returns queries to the API as real objects\n        ' #NEWLINE# response = self . _query ( url , params , http_method ) #NEWLINE# response_json = response . json ( ) #NEWLINE# if ( 'error' in response_json ) : #NEWLINE# #INDENT# self . _logger . error ( ( ( ( 'Error in response from server on request to ' + url ) + ' : ' ) + response_json [ 'error' ] ) ) #NEWLINE# raise mediacloud . error . MCException ( response_json [ 'error' ] , requests . codes . ok ) #NEWLINE# #UNINDENT# return response_json