#NEWLINE# def search( self , query , offset = None , cities = None , domain = None , fields = None , limit = 10 , lang = 'en' ) : #NEWLINE# #INDENT# params = dict ( query = query , lang = lang ) #NEWLINE# if offset : #NEWLINE# #INDENT# assert isinstance ( offset , integer_types ) #NEWLINE# params [ 'offset' ] = str ( offset ) #NEWLINE# #UNINDENT# if cities : #NEWLINE# #INDENT# assert isinstance ( cities , string_types ) #NEWLINE# params [ 'cities' ] = fields #NEWLINE# #UNINDENT# if domain : #NEWLINE# #INDENT# assert isinstance ( domain , string_types ) #NEWLINE# params [ 'domain' ] = domain #NEWLINE# #UNINDENT# if fields : #NEWLINE# #INDENT# assert isinstance ( fields , string_types ) #NEWLINE# params [ 'fields' ] = fields #NEWLINE# #UNINDENT# data = self . _call_oauth2_metrics ( 'v3/search' , params , limit = limit ) #NEWLINE# return data [ 'results' ]