<s> from libsaas . services import base <EOL> from libsaas import http , parsers <EOL> class BitlyResource ( base . HierarchicalResource ) : <EOL> def _get ( self , path , params ) : <EOL> url = '<STR_LIT>' . format ( self . get_url ( ) , path ) <EOL> request = http . Request ( '<STR_LIT:GET>' , url , params ) <EOL> return request , parsers . parse_json <EOL> class HighValue ( BitlyResource ) : <EOL> path = '<STR_LIT>' <EOL> @ base . apimethod <EOL> def get ( self , limit ) : <EOL> """<STR_LIT>""" <EOL> params = base . get_params ( None , locals ( ) ) <EOL> request = http . Request ( '<STR_LIT:GET>' , self . get_url ( ) , params ) <EOL> return request , parsers . parse_json <EOL> class Search ( BitlyResource ) : <EOL> path = '<STR_LIT>' <EOL> @ base . apimethod <EOL> def get ( self , limit = None , offset = None , query = None , lang = None , <EOL> cities = None , domain = None , fields = None ) : <EOL> """<STR_LIT>""" <EOL> params = base . get_params ( None , locals ( ) ) <EOL> request = http . Request ( '<STR_LIT:GET>' , self . get_url ( ) , params ) <EOL> return request , parsers . parse_json <EOL> class RealTime ( BitlyResource ) : <EOL> path = '<STR_LIT>' <EOL> @ base . apimethod <EOL> def bursting_phrases ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _get ( '<STR_LIT>' , { } ) <EOL> @ base . apimethod <EOL> def hot_phrases ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . _get ( '<STR_LIT>' , { } ) <EOL> @ base . apimethod <EOL> def clickrate ( self , phrase ) : <EOL> """<STR_LIT>""" <EOL> params = base . get_params ( None , locals ( ) ) <EOL> return self . _get ( '<STR_LIT>' , params ) </s>
