Authorize

Arguments

  • consumer_key: str = None
  • consumer_secret: str = None
  • access_token: str = None
  • access_token_secret: str = None

Authorize to Twitter API

param consumer_key:
 app consumer key
param consumer_secret:
 app consumer secret
param access_token:
 user access token
param access_token_secret:
 user access token secret

Follow

Arguments

  • user: str = None

Follow Twitter user

param user:screen name of the user
return:True if user was followed, False if not

Get Me

Arguments

Get Twitter profile of authenticated user

return:user profile as dictionary or None

Get User Profile

Arguments

  • username: str = None

Get user's Twitter profile

param username:whose profile to get
return:profile as dictionary

Get User Tweets

Arguments

  • username: str = None
  • count: int = 100

Get user tweets

param username:whose tweets to get
param count:maximum number of tweets, defaults to 100
return:list of user tweets

Like

Arguments

  • tweet: Tweet = None

Like a tweet

param tweet:as a class Tweet
return:True if Tweet was liked, False if not

Text Search Tweets

Arguments

  • query: str = None
  • count: int = 100
  • geocode: str = None
  • lang: str = None
  • locale: str = None
  • result_type: str = mixed
  • until: str = None
  • since_id: str = None
  • max_id: str = None

Search tweets defined by search query

Results types:
  • mixed : include both popular and real time results in the response
  • recent : return only the most recent results in the response
  • popular : return only the most popular results in the response
param query:search query string of 500 characters maximum, including operators
param count:maximum number of tweets, defaults to 100
param geocode:tweets by users located within a given radius of the given latitude/longitude
param lang:language code of tweets
param locale:language of the query you are sending
param result_type:
 type of search results you would prefer to receive, default "mixed"
param until:tweets created before the given date
param since_id:Returns only statuses with an ID greater than
param max_id:only statuses with an ID less than
return:list of matching tweets

Tweet

Arguments

  • content: str = None

Make a tweet with content

param content:text for the status update

Unfollow

Arguments

  • user: str = None

Unfollow Twitter user

param user:screen name of the user
return:True if user was followed, False if not

Unlike

Arguments

  • tweet: Tweet = None

Unlike a tweet

param tweet:as a class Tweet
return:True if Tweet was unliked, False if not