<s> from . import QueryRequest <EOL> import json <EOL> class TextRequest ( QueryRequest ) : <EOL> """<STR_LIT>""" <EOL> @ property <EOL> def query ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _query <EOL> @ query . setter <EOL> def query ( self , query ) : <EOL> self . _query = query <EOL> def __init__ ( self , client_access_token , base_url , version , session_id ) : <EOL> super ( TextRequest , self ) . __init__ ( client_access_token , base_url , version , session_id ) <EOL> self . query = None <EOL> def _prepare_headers ( self ) : <EOL> return { <EOL> '<STR_LIT:Content-Type>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : len ( self . _prepage_end_request_data ( ) ) <EOL> } <EOL> def _prepage_begin_request_data ( self ) : <EOL> return None <EOL> def _prepage_end_request_data ( self ) : <EOL> data = { <EOL> '<STR_LIT>' : self . query , <EOL> '<STR_LIT>' : self . lang , <EOL> '<STR_LIT>' : self . session_id , <EOL> '<STR_LIT>' : self . contexts , <EOL> '<STR_LIT>' : self . time_zone , <EOL> '<STR_LIT>' : self . resetContexts , <EOL> '<STR_LIT>' : self . _prepare_entities ( ) , <EOL> } <EOL> return json . dumps ( data ) </s>
