All Available Functions

This page contains all the public method available to work with

Attention

All methods requires user to be authenticated

Attention

All method’s examples assumes app is authenticated instance of Twitter

Get User Info

  • Twitter().get_user_info(username: Union[str, int, list] = None)

    Get the User Info of the specified username

    Arguments
    username(optional): str = None

    Username, User ID or List of User IDs of the user you want to get info of.

    Return
    Returns:

    User | list[User]

    user = app.get_user_info('elonmusk')
    

Get User ID

  • Twitter().get_user_id(username: str)

    Get User ID of a specific Username

    Tip

    (in case you only want User ID, you must be using this method)

    Arguments
    username: str

    Username of the user you want to get ID of.

    Return
    Returns:

    str

    user = app.get_user_id('elonmusk')
    

Get User Tweets

  • Twitter().get_tweets(username: str, pages: int = 1, replies: bool = False, wait_time: int = 2, cursor: str = None)
  • Twitter().iter_tweets(username: str, pages: int = 1, replies: bool = False, wait_time: int = 2, cursor: str = None)

    Get the Tweets of the specified username (iter for generator)

    Arguments
    username: str

    Username of the user you want to get Tweets of.

    pages(optional): int = 1

    Number of Tweet Pages you want to get

    replies(optional): bool = False

    Fetch the Replied Tweets of the User

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    UserTweets

    Returns:

    Generator : (UserTweets , list[Tweet])

    tweets = app.get_tweets('elonmusk')
    for tweet in tweets:
        print(tweet)
    

Get User Medias

  • Twitter().get_user_media(username: str, pages: int = 1, wait_time: int = 2, cursor: str = None)
  • Twitter().iter_user_media(username: str, pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get the User Media of the specified username (iter for generator)

    Arguments
    username: str

    Username of the user you want to get Tweets of.

    pages(optional): int = 1

    Number of Tweet Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    UserMedia

    Returns:

    Generator : (UserMedia , list[Tweet])

    tweets = app.get_user_media('elonmusk')
    for tweet in tweets:
        print(tweet.media)
    

Searching a Keyword

  • Twitter().search(keyword: str, pages: int = 1, filter_: str = None, wait_time: int = 2, cursor: str = None)
  • Twitter().iter_search(keyword: str, pages: int = 1, filter_: str = None, wait_time: int = 2, cursor: str = None)

    Search for a keyword or hashtag on Twitter (iter for generator)

    Arguments
    keyword(Required): str

    The keyword which is supposed to be searched

    pages(optional): int = 1

    Number of Tweet Pages you want to get

    filter_(optional): str = None

    Filter you would like to apply on the search. More about Search Filters

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    Search

    Returns:

    Generator: (Search, list[Tweet])

    tweets = app.search('elonmusk')
    for tweet in tweets:
        print(tweet)
    

Get a Tweet Detail

  • Twitter().tweet_detail(identifier: str)

    Search for a keyword or hashtag on Twitter

    Arguments
    identifier(Required): str

    Either ID of the Tweet of URL of the Tweet you want to detail of.

    Return
    Returns:

    Tweet

    tweet = app.tweet_detail("https://twitter.com/Microsoft/status/1442542812197801985")
    

Getting Home Timeline

  • Twitter().get_home_timeline(timeline_type: str = "HomeTimeline", pages: int = 1, wait_time: int = 2, cursor: str = None)
  • Twitter().iter_home_timeline(timeline_type: str = "HomeTimeline", pages: int = 1, wait_time: int = 2, cursor: str = None)

    Getting the Tweets from Home Page of Authenticated User (iter for generator)

    Arguments
    timeline_type(optional): str = "HomeTimeline"

    The type of Timeline to Get (“HomeTimeline”, “HomeLatestTimeline”)

    pages(optional): int = 1

    Number of Tweet Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    SelfTimeline

    Returns:

    Generator: (SelfTimeline, list[Tweet])

    from tweety.types import HOME_TIMELINE_TYPE_FOR_YOU, HOME_TIMELINE_TYPE_FOLLOWING
    
    ...
    
    tweets = app.get_home_timeline(timeline_type=HOME_TIMELINE_TYPE_FOR_YOU)
    for tweet in tweets:
        print(tweet)
    

Getting Tweet Likes

  • Twitter().get_tweet_likes(tweet_id: Union[str, Tweet] ,pages: int = 1, wait_time: int = 2, cursor: str = None)
  • Twitter().iter_tweet_likes(tweet_id: Union[str, Tweet] ,pages: int = 1, wait_time: int = 2, cursor: str = None)

    Getting the Users who have Likes of Tweet (iter for generator)

    Arguments
    tweet_id: str | Tweet = 1

    ID of the Tweet

    pages(optional): int = 1

    Number of Tweet Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    TweetLikes

    Returns:

    Generator: (TweetLikes, list[Tweet])

    tweet = app.tweet_detail("1232515235253352")
    likes = app.get_tweet_likes(tweet)
    for like in likes:
        print(like)
    

Getting Tweet Retweets

  • Twitter().get_tweet_retweets(tweet_id: Union[str, Tweet] ,pages: int = 1, wait_time: int = 2, cursor: str = None)
  • Twitter().iter_tweet_retweets(tweet_id: Union[str, Tweet] ,pages: int = 1, wait_time: int = 2, cursor: str = None)

    Getting the Users who have Retweeted of Tweet (iter for generator)

    Arguments
    tweet_id: str | Tweet = 1

    ID of the Tweet

    pages(optional): int = 1

    Number of Tweet Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    TweetRetweets

    Returns:

    Generator: (TweetRetweets, list[Tweet])

    tweet = app.tweet_detail("1232515235253352")
    users = app.get_tweet_retweets(tweet)
    for user in users:
        print(user)
    

Getting Mentioned Tweets

  • Twitter().get_mentions(pages: int = 1, wait_time: int = 2, cursor: str = None)
  • Twitter().iter_mentions(pages: int = 1, wait_time: int = 2, cursor: str = None)

    Getting the Tweets in which the authenticated user is mentioned (iter for generator)

    Arguments
    pages(optional): int = 1

    Number of Tweet Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    Mention

    Returns:

    Generator: (Mention, list[Tweet])

    tweets = app.get_mentions()
    for tweet in tweets:
        print(tweet)
    

Getting Bookmarks

  • Twitter().get_bookmarks(pages: int = 1, wait_time: int = 2, cursor: str = None)
  • Twitter().iter_bookmarks(pages: int = 1, wait_time: int = 2, cursor: str = None)

    Getting the Bookmarked Tweets of authenticated user (iter for generator)

    Arguments
    pages(optional): int = 1

    Number of Tweet Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    Bookmarks

    Returns:

    Generator: (Bookmarks, list[Tweet])

    tweets = app.get_bookmarks()
    for tweet in tweets:
        print(tweet)
    

Getting Inbox

  • Twitter().get_inbox(user_id: Union[int, str, User] = None, cursor: str = None)

    Getting the inbox of authenticated user

    Arguments
    user_id(optional): int | str | User = None

    User ID of the user whom to get the conversation of (coming soon)

    cursor(optional): str = None

    Pagination cursor of inbox which will be used to get the new messages

    Return
    Returns:

    Inbox

    inbox = app.get_inbox()
    for conversation in inbox:
        print(conversation)
    

Sending Message

  • Twitter().send_message(username: Union[str, int, User], text: str, file: Union[str, UploadedMedia] = None, in_group:bool = False)

    Sending Message to a User

    Arguments
    username: int | str | User

    Username of User ID of the user whom to send the message

    text: str

    Content of the message to be sent

    file: str

    Filepath of the file to be sent

    in_group: bool

    Either Message is begin sent in group or not

    Return
    Returns:

    Message

    message = app.send_message("user", "Hi")
    

Creating a Tweet

  • Twitter().create_tweet(text: str, files: list[Union[str, UploadedMedia, tuple[str, str]]] = None, filter_: str = None, reply_to: str = None, quote: str = None)

    Create a Tweet using the authenticated user

    Arguments
    text: str

    Content of the message to be sent

    files(optional): list[str | UploadedMedia | tuple[str, str]]

    List of Filepath of the files to be sent

    filter_(optional)
    :type: str |  TweetConversationFilters

    Filter to be applied for Tweet Audience. More about Search Filters

    reply_to(optional): str | Tweet

    ID of tweet to reply to

    quote: str | Tweet

    ID of tweet to Quote

    Return
    Returns:

    Tweet

    message = app.create_tweet("user", reply_to="1690430294208483322")
    

Liking the Tweet

  • Twitter().like_tweet(tweet_id: Union[str, int , Tweet])

    Post a Like on a Tweet

    Arguments
    tweet_id: str | int | Tweet

    Id of the Tweet

    Return
    Returns:

    bool

    app.like_tweet("123456789")
    

Un-Liking the Tweet

  • Twitter().unlike_tweet(tweet_id: Union[str, int , Tweet])

    UnLike a Posted a Like on a Tweet

    Arguments
    tweet_id: str | int | Tweet

    Id of the Tweet

    Return
    Returns:

    bool

    app.unlike_tweet("123456789")
    

Retweeting the Tweet

  • Twitter().retweet_tweet(tweet_id: Union[str, int , Tweet])

    Post a Retweet on a Tweet

    Arguments
    tweet_id: str | int | Tweet

    Id of the Tweet

    Return
    Returns:

    bool

    app.retweet_tweet("123456789")
    

Delete a Retweet

  • Twitter().delete_retweet(tweet_id: Union[str, int , Tweet])

    Delete a Retweet on a Tweet

    Arguments
    tweet_id: str | int | Tweet

    Id of the Tweet

    Return
    Returns:

    bool

    app.delete_retweet("123456789")
    

Follow a User

  • Twitter().follow_user(user_id: Union[str, int , User])

    Follow a User

    Arguments
    user_id: str | int | User

    Id of the User

    Return
    Returns:

    User

    app.follow_user("123456789")
    

UnFollow a User

  • Twitter().unfollow_user(user_id: Union[str, int , User])

    Un-Follow a User

    Arguments
    user_id: str | int | User

    Id of the User

    Return
    Returns:

    User

    app.unfollow_user("123456789")
    

Block a User

  • Twitter().block_user(user_id: Union[str, int , User])

    Block a User

    Arguments
    user_id: str | int | User

    Id of the User

    Return
    Returns:

    User

    app.block_user("123456789")
    

Un-Block a User

  • Twitter().unblock_user(user_id: Union[str, int , User])

    Block a User

    Arguments
    user_id: str | int | User

    Id of the User

    Return
    Returns:

    User

    app.unblock_user("123456789")
    

Get Community

  • Twitter().get_community(community_id: Union[str, int])

    Get a Community Details

    Arguments
    community_id: str | int

    Id of the Community

    Return
    Returns:

    Community

    from tweety import Twitter
    
    app = Twitter("session")
    app.get_community("123456789")
    

Get Community Tweets

  • Twitter().get_community_tweets(community_id: str, pages: int = 1, filter_: str = None, wait_time: int = 2, cursor: str = None)
  • Twitter().iter_community_tweets(community_id: str, pages: int = 1, filter_: str = None, wait_time: int = 2, cursor: str = None)

    Get the Tweets of the specified community (iter for generator)

    Arguments
    community_id(Required): str | Community

    ID of the community you want to get Tweets of.

    pages(optional): int = 1

    Number of Tweet Pages you want to get

    filter_(optional): str = None

    Filter you would like to apply on the tweets. More about Search Filters

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    CommunityTweets

    Returns:

    Generator: (CommunityTweets, list[Tweet])

    from tweety import Twitter
    
    app = Twitter("session")
    tweets = app.get_community_tweets(12345678)
    for tweet in tweets:
        print(tweet)
    

Get Community Members

  • Twitter().get_community_members(community_id: str, pages: int = 1, filter_: str = None, wait_time: int = 2, cursor: str = None)
  • Twitter().iter_community_members(community_id: str, pages: int = 1, filter_: str = None, wait_time: int = 2, cursor: str = None)

    Get the Members of the specified community (iter for generator)

    Arguments
    community_id(Required): str | Community

    ID of the community you want to get Tweets of.

    pages(optional): int = 1

    Number of Tweet Pages you want to get

    filter_(optional): str = None

    Filter you would like to apply on the tweets. More about Search Filters

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    CommunityMembers

    Returns:

    Generator: (CommunityMembers, list[User])

    from tweety import Twitter
    
    app = Twitter("session")
    users = app.get_community_members(12345678)
    for user in users:
        print(user)
    

Delete Tweet

  • Twitter().delete_tweet(tweet_id: Union[str, int, Tweet])

    Delete a Tweet posted by authenticated user

    Arguments
    tweet_id: str | int | Tweet

    Id of the Tweet

    Return
    Returns:

    Bool

    app.delete_tweet("123456789")
    

Enable User Notifications

  • Twitter().enable_user_notification(user_id: Union[str, int, User])

    Enable user notification on new tweet from specific user

    Arguments
    user_id: str | int | User

    Id of the User

    Return
    Returns:

    Bool

    app.enable_user_notification("123456789")
    

Disable User Notifications

  • Twitter().disable_user_notification(user_id: Union[str, int, User])

    Disable user notification on new tweet from specific user

    Arguments
    user_id: str | int | User

    Id of the User

    Return
    Returns:

    Bool

    app.disable_user_notification("123456789")
    

Get Notified Tweets

  • Twitter().get_tweet_notifications(pages: int = 1, wait_time: int = 2, cursor: str = None)
  • Twitter().iter_tweet_notifications(pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get the Tweets of the user whom the authenticated user has enabled the New Tweet Notification , (use iter for generator)

    Arguments
    pages(optional): int = 1

    Number of Tweet Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    TweetNotifications

    Returns:

    Generator: (TweetNotifications, list[Tweet])

    tweets = app.get_tweet_notifications()
    for tweet in tweets:
        print(tweet)
    

Get User Followers

  • Twitter().get_user_followers(username: str, pages: int = 1, wait_time: int = 2, cursor: str = None)
  • Twitter().iter_user_followers(username: str, pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get the Followers of specified User , (use iter for generator)

    Arguments
    username: str

    Username of the target user

    pages(optional): int = 1

    Number of Tweet Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    UserFollowers

    Returns:

    Generator: (UserFollowers, list[User])

    from tweety import Twitter
    
    app = Twitter("session")
    users = app.get_user_followers()
    for user in users:
        print(user)
    

Get User Followings

  • Twitter().get_user_followings(username: str, pages: int = 1, wait_time: int = 2, cursor: str = None)
  • Twitter().iter_user_followings(username: str, pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get the Followings of specified User , (use iter for generator)

    Arguments
    username: str

    Username of the target user

    pages(optional): int = 1

    Number of Tweet Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    UserFollowings

    Returns:

    Generator: (UserFollowings, list[User])

    from tweety import Twitter
    
    app = Twitter("session")
    users = app.get_user_followings()
    for user in users:
        print(user)
    

Get Tweet Comments

  • Twitter().get_tweet_comments(tweet_id: int, pages: int = 1, wait_time: int = 2, cursor: str = None, get_hidden: bool = False)
  • Twitter().iter_tweet_comments(tweet_id: int, pages: int = 1, wait_time: int = 2, cursor: str = None, get_hidden: bool = False)

    Get the Comments of specified Tweet , (use iter for generator)

    Arguments
    tweet_id: str | int | Tweet

    Target Tweet

    pages(optional): int = 1

    Number of Tweet Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    get_hidden(optional): bool = False

    Get hidden comments or not

    Return
    Returns:

    TweetComments

    Returns:

    Generator: (TweetComments, list[ConversationThread])

    from tweety import Twitter
    
    app = Twitter("session")
    threads = app.get_tweet_comments("123456789")
    for thread in threads:
        print(thread)
    

Get Lists

  • Twitter().get_lists(pages: int = 1, wait_time: int = 2, cursor: str = None)
  • Twitter().iter_lists(pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get lists of Authenticated User

    Arguments
    pages(optional): int = 1

    Number of Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    Lists

    Returns:

    Generator: (Lists, list[TwList])

    lists = app.get_lists()
    for _list in lists:
        print(_list)
    

Create List

  • Twitter().create_list(name: str, description: str = "", is_private: bool = False)

    Create a List on Twitter

    Arguments
    name: str

    Name of List

    description: str = ""

    Description of List

    is_private: bool

    Either to create the list private or not

    Return
    Returns:

    TwList

    _list = app.create_list("list_name")
    print(_list)
    

Delete List

  • Twitter().delete_list(list_id: int)

    Delete a List using List ID if authenticated user is Admin

    Arguments
    list_id: int | str

    ID of Target List

    Return
    Returns:

    bool

    _list = app.delete_list("123515")
    print(_list)
    

Get List

  • Twitter().get_list(list_id: int)

    Get a List using List ID

    Arguments
    list_id: int | str

    ID of Target List

    Return
    Returns:

    TwList

    _list = app.get_list("123515")
    print(_list)
    

Get List Tweets

  • Twitter().get_list_tweets(list_id: int, pages: int = 1, wait_time: int = 2, cursor: str = None)
  • Twitter().iter_list_tweets(list_id: int, pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get Tweets of specific List (iter for generator)

    Arguments
    list_id: int | str

    ID of Target List

    pages(optional): int = 1

    Number of Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    ListTweets

    Returns:

    Generator: (ListTweets, list[Tweet])

    tweets = app.get_list_tweets("123515")
    for tweet in tweets:
        print(tweet)
    

Get List Members

  • Twitter().get_list_member(list_id: int, pages: int = 1, wait_time: int = 2, cursor: str = None)
  • Twitter().iter_list_member(list_id: int, pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get Tweets of specific List (iter for generator)

    Arguments
    list_id: int | str

    ID of Target List

    pages(optional): int = 1

    Number of Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    ListMembers

    Returns:

    Generator: (ListMembers, list[User])

    users = app.get_list_member("123515")
    for user in users:
        print(user)
    

Add List Member

  • Twitter().add_list_member(list_id: int, user_id: int)

    Add a specific user from List

    Arguments
    list_id: int | str

    ID of Target List

    user_id: int | str | User

    ID of User to be added

    Return
    Returns:

    TwList

    _list = app.add_list_member("123515", "elonmusk")
    print(_list)
    

Remove List Member

  • Twitter().remove_list_member(list_id: int, user_id: int)

    Remove a specific user from List

    Arguments
    list_id: int | str

    ID of Target List

    user_id: int | str | User

    ID of User to be added

    Return
    Returns:

    TwList

    _list = app.remove_list_member("123515", "elonmusk")
    print(_list)
    

Get Topic

  • Twitter().get_topic(topic_id: Union[str, int])

    Get a topic using ID

    Arguments
    topic_id: int | str

    ID of Topic

    Return
    Returns:

    Topic

    topic = app.get_topic("123515")
    print(topic)
    

Get Topic Tweets

  • Twitter().get_topic_tweets(topic_id: str, pages: int = 1, wait_time: int = 2, cursor: str = None)
  • Twitter().iter_topic_tweets(topic_id: str, pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get the Tweets of the specified Topic (iter for generator)

    Arguments
    topic_id: str

    ID of the Topic

    pages(optional): int = 1

    Number of Tweet Pages you want to get

    replies(optional): bool = False

    Fetch the Replied Tweets of the User

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    TopicTweets

    Returns:

    Generator : (TopicTweets , list[Tweet])

    tweets = app.get_topic_tweets('123456')
    for tweet in tweets:
        print(tweet)
    

Get Tweet Analytics

  • Twitter().get_tweet_analytics(tweet_id: Union[str, int, Tweet])

    Get Analytics of a Tweet (made by authenticated user)

    Arguments
    tweet_id: int | str

    ID of Tweet

    Return
    Returns:

    TweetAnalytics

    tweet = app.get_tweet_analytics("123515")
    print(tweet)
    

Get Mutual Friends/Followers

  • Twitter().get_mutual_followers(username: str, pages: int = 1, wait_time: int = 2, cursor: str = None)
  • Twitter().iter_mutual_followers(username: str, pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get the Mutual Followers/Friends of a User (iter for generator)

    Arguments
    username: str

    Username of the user you want to get Tweets of.

    pages(optional): int = 1

    Number of Tweet Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    MutualFollowers

    Returns:

    Generator : (MutualFollowers , list[User])

    users = app.get_mutual_followers('elonmusk')
    for user in users:
        print(user)
    

Get Blocked Users

  • Twitter().get_blocked_users(pages: int = 1, wait_time: int = 2, cursor: str = None)
  • Twitter().iter_blocked_users(pages: int = 1, wait_time: int = 2, cursor: str = None)

    Get the users blocked by authenticated user (iter for generator)

    Arguments
    pages(optional): int = 1

    Number of Tweet Pages you want to get

    wait_time(optional): int = 2

    Number of seconds to wait between multiple requests

    cursor(optional): str = None

    Pagination cursor if you want to get the pages from that cursor up-to (This cursor is different from actual API cursor)

    Return
    Returns:

    BlockedUsers

    Returns:

    Generator : (BlockedUsers , list[User])

    users = app.get_blocked_users()
    for user in users:
        print(user)
    

Get Translated Tweet

  • Twitter().translate_tweet(tweet_id: Union[str, int, Tweet], language: str)

    Get specific Tweet in a specific Language

    Arguments
    tweet_id: int | str

    ID of Tweet

    language: str

    Language to which you want to translate

    Return
    Returns:

    TweetTranslate

    from tweety.filters import Language
    
    ...
    
    tweet = app.translate_tweet("123515", Language.English)
    print(tweet)