Module Expr Str Import alias Import alias identifier Import alias Import alias alias Import alias Import alias Import alias alias alias alias Import alias identifier Import alias Import alias Assign NameStore Str Assign NameStore Str Assign NameStore Str ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore Str Assign NameStore BinOpAdd BinOpAdd BinOpAdd NameLoad Str AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Str If CompareNotEq Call NameLoad SubscriptLoad NameLoad Index Str Num body Raise Call NameLoad BinOpMod Str SubscriptLoad NameLoad Index Str Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Dict Str Str Str NameLoad Str Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad NameLoad NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Dict Str Call NameLoad NameLoad AugAssignAdd NameStore BinOpAdd Str Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If CompareNotEq Call NameLoad AttributeLoad NameLoad attr Num body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Dict For NameStore SubscriptLoad NameLoad Index Str body For NameStore NameLoad body If CompareEq NameLoad Str body If CompareIn SubscriptLoad SubscriptLoad NameLoad Index Str Index Str NameLoad body Assign SubscriptStore SubscriptLoad NameLoad Index SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index SubscriptLoad NameLoad Index NameLoad Call NameLoad Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Str orelse Assign SubscriptStore NameLoad Index SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Dict SubscriptLoad NameLoad Index NameLoad Call NameLoad Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Str Return TupleLoad SubscriptLoad NameLoad Index Str Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Dict Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad NameLoad NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Dict Str Call NameLoad NameLoad If NameLoad body AugAssignAdd NameStore BinOpAdd Str Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If CompareNotEq Call NameLoad AttributeLoad NameLoad attr Num body Raise Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore NameLoad body For NameStore NameLoad body If CompareEq NameLoad Str body Assign NameStore BinOpAdd BinOpAdd BinOpAdd SubscriptLoad NameLoad Index NameLoad Str NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign NameStore Dict Assign SubscriptStore NameLoad Index Str NameLoad Return NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad keyword Str decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Str attr ListComp Call NameLoad Call AttributeLoad NameLoad attr Num Num comprehension NameStore Call NameLoad Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str If NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr orelse Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore BinOpAdd BinOpAdd BinOpAdd BinOpAdd Call AttributeLoad NameLoad attr Str Call NameLoad Call NameLoad NameLoad Str Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Return Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Slice Num Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore BinOpAdd BinOpAdd Call NameLoad NameLoad Str Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore GeneratorExp BinOpMod Str TupleLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Return BinOpAdd Str Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Dict Str Str Str Str Str Str Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr Str Str NameLoad Call NameLoad NameLoad Return NameLoad decorator_list
N/A N/A 
twitter.py contains a handful of methods for interacting
with Twitter data and returning the responses as JSON.
 N/A urlparse N/A oauth2 oauth N/A requests N/A base64 random N/A urllib N/A binascii N/A time collections hmac hashlib N/A simplejson json2 N/A codecs N/A json N/A REQUEST_TOKEN_URL https://api.twitter.com/oauth/request_token N/A ACCESS_TOKEN_URL https://api.twitter.com/oauth/access_token N/A AUTHORIZE_URL https://api.twitter.com/oauth/authorize TwitterOauthClient N/A object N/A N/A 
    Python Client for Twitter API.
     N/A oauth_token None N/A oauth_token_secret None N/A username None N/A is_authorized False __init__ N/A N/A self consumer_key consumer_secret access_token access_token_secret N/A N/A N/A 
        Parameters:
            consumer_key: String
                - The consumer_key from registering application
                  on Instagram.
            consumer_secret: String
                - The consumer_secret from registering application
                  on Instagram.
         N/A N/A self consumer_key consumer_key N/A N/A self consumer_secret consumer_secret N/A N/A self access_token access_token N/A N/A self access_token_secret access_token_secret N/A N/A self consumer N/A N/A oauth Consumer key N/A self consumer_key secret N/A self consumer_secret N/A get_authorize_url N/A N/A self N/A N/A N/A 
        Obtained oauth_token and oauth_token_secret from request_token_url,
        returns an authorize url.

        From the redirect url, we obtain the oauth verifier.

        Returns:
            authURL: String
                - The authorization url.
         N/A client N/A N/A oauth Client N/A self consumer N/A N/A resp content N/A N/A client request REQUEST_TOKEN_URL GET N/A requestToken N/A dict N/A N/A urlparse parse_qsl content N/A N/A self oauth_token N/A requestToken N/A oauth_token N/A N/A self oauth_token_secret N/A requestToken N/A oauth_token_secret N/A redirectUri &redirect_uri=http%3A%2F%2Flocalhost%3A8000/hackathon/twitter/ N/A authURL N/A N/A N/A AUTHORIZE_URL ?oauth_token= N/A self oauth_token redirectUri N/A authURL N/A get_access_token_url N/A N/A self oauthVerifier N/A N/A N/A 
        Get access token from redirect url.

        Parameters:
            oauthVerifier: String
                - A paramater retrieved from scraping the redirect url.

        Returns:
            data: Dictionary
                - A dictionary containing recent tagged 120 media
                  counts data pertaining to each media.
         N/A token N/A N/A oauth Token N/A self oauth_token N/A self oauth_token_secret N/A N/A N/A token set_verifier oauthVerifier N/A client N/A N/A oauth Client N/A self consumer token N/A N/A resp content N/A N/A client request ACCESS_TOKEN_URL POST N/A N/A N/A int N/A resp N/A status 200 N/A N/A N/A Exception N/A Invalid response %s N/A resp N/A status N/A accessToken N/A dict N/A N/A urlparse parse_qsl content N/A N/A self oauth_token N/A accessToken N/A oauth_token N/A N/A self oauth_token_secret N/A accessToken N/A oauth_token_secret N/A N/A self username N/A accessToken N/A screen_name N/A N/A self is_authorized True N/A get_tweets N/A N/A self tweet N/A N/A N/A 
        Get tweets of relevant search query.
         N/A method get N/A link https://api.twitter.com/1.1/search/tweets.json N/A linkParameters N/A q count result_type tweet 100 popular N/A oauthParameters N/A getOauthParameters N/A self consumer_key N/A self access_token N/A N/A oauthParameters N/A oauth_signature N/A generateSignature method link linkParameters oauthParameters N/A self consumer_secret N/A self access_token_secret N/A headers N/A Authorization N/A createAuthHeader oauthParameters N/A link N/A ? N/A N/A urllib urlencode linkParameters N/A req N/A N/A requests get link headers headers N/A N/A N/A int N/A req status_code 200 N/A N/A N/A Exception N/A Invalid response %s N/A req status_code N/A content N/A N/A json2 loads N/A req content N/A jsonlist N/A N/A contrib N/A content N/A statuses N/A N/A e contrib N/A N/A N/A e retweet_count N/A N/A N/A N/A N/A contrib N/A user N/A screen_name jsonlist N/A N/A N/A N/A jsonlist N/A N/A N/A contrib N/A user N/A screen_name N/A N/A contrib N/A e N/A str N/A N/A N/A contrib N/A text encode ascii ignore N/A N/A N/A jsonlist N/A N/A N/A contrib N/A user N/A screen_name N/A N/A contrib N/A e N/A str N/A N/A N/A contrib N/A text encode ascii ignore N/A N/A N/A content N/A statuses N/A N/A json dumps jsonlist N/A get_trends_available N/A N/A self yahooConsumerKey N/A N/A N/A 
        Get the locations that Twitter has trending topic information for.

         N/A method get N/A link https://api.twitter.com/1.1/trends/available.json N/A linkParameters N/A N/A oauthParameters N/A getOauthParameters N/A self consumer_key N/A self access_token N/A N/A oauthParameters N/A oauth_signature N/A generateSignature method link linkParameters oauthParameters N/A self consumer_secret N/A self access_token_secret N/A headers N/A Authorization N/A createAuthHeader oauthParameters N/A linkParameters N/A N/A link N/A ? N/A N/A urllib urlencode linkParameters N/A req N/A N/A requests get link headers headers N/A N/A N/A int N/A req status_code 200 N/A N/A N/A Exception N/A Invalid response %s N/A req status_code N/A content N/A N/A json2 loads N/A req content N/A place content N/A N/A item place N/A N/A N/A item url N/A N/A url N/A N/A N/A N/A place N/A item /neighbors?appid= yahooConsumerKey &format=json N/A requestNeighborData N/A N/A requests get url N/A N/A N/A requestNeighborData status_code 200 N/A N/A neighbor N/A N/A json2 loads N/A requestNeighborData content N/A N/A neighbor N/A N/A N/A place N/A neighbor neighbor N/A content N/A N/A percentEncode N/A N/A string N/A N/A N/A 
    Percent encode strings.
     N/A N/A N/A urllib quote string safe ~ N/A getNonce N/A N/A N/A N/A N/A 
    Generate unique token per request.
     N/A nonce N/A N/A base64 b64encode N/A N/A join N/A N/A str N/A N/A random randint 0 9 N/A i N/A range 24 N/A nonce N/A generateSignature N/A N/A method link linkParameters oauthParameters oauthConsumerSecret oauthTokenSecret N/A None N/A N/A 
    Generate signature.
     N/A linkParameters N/A N/A newDict N/A dict oauthParameters linkParameters N/A params N/A N/A urllib urlencode N/A N/A collections OrderedDict N/A sorted N/A N/A newDict items N/A N/A params N/A N/A urllib urlencode N/A N/A collections OrderedDict N/A sorted N/A N/A oauthParameters items N/A signatureBaseString N/A N/A N/A N/A N/A N/A method upper & N/A percentEncode N/A str link & N/A percentEncode params N/A signingKey N/A createSigningKey oauthConsumerSecret oauthTokenSecret N/A N/A calculateSignature signingKey signatureBaseString N/A calculateSignature N/A N/A signingKey signatureBaseString N/A N/A N/A 
    Calculate signature using HMAC-SHA1 hashing algorithm.
     N/A hashed N/A N/A hmac new signingKey signatureBaseString N/A hashlib sha1 N/A sig N/A N/A N/A binascii b2a_base64 N/A N/A hashed digest N/A -1 N/A N/A percentEncode sig N/A createSigningKey N/A N/A oauthConsumerSecret oauthTokenSecret N/A N/A N/A 
    Creates a key to sign the request with.
     N/A signingKey N/A N/A N/A percentEncode oauthConsumerSecret & N/A percentEncode oauthTokenSecret N/A signingKey N/A createAuthHeader N/A N/A parameters N/A N/A N/A 
    Format authorization header with oath parameters.
     N/A orderedParameters N/A N/A collections OrderedDict N/A sorted N/A N/A parameters items N/A authHeader N/A N/A %s="%s" N/A k v N/A N/A k v N/A N/A orderedParameters iteritems N/A N/A OAuth  N/A N/A ,  join authHeader N/A getOauthParameters N/A N/A consumerKey accessToken N/A N/A N/A 
    Returns parameters for making requests.
     N/A oauthParameters N/A oauth_timestamp oauth_signature_method oauth_version oauth_token oauth_nonce oauth_consumer_key N/A str N/A int N/A N/A time time HMAC-SHA1 1.0 accessToken N/A getNonce consumerKey N/A oauthParameters N/A