# Twitter Tasks


Tasks for interacting with Twitter.

# LoadTweetReplies

class

prefect.tasks.twitter.twitter.LoadTweetReplies

(user=None, tweet_id=None, **kwargs)[source]

A task for loading replies to a specific user's tweet. This task works by querying the 100 most recent replies to that user, then filtering for those that match the specified tweet id.

This code is based on the work of Matt Dickenson @mcdickenson https://mattdickenson.com/2019/03/02/extract-replies-to-tweet/

Note that all initialization settings can be provided / overwritten at runtime.

Args:

  • user (str): a Twitter user
  • tweet_id (str): a tweet ID; replies to this tweet will be retrieved
  • **kwargs (optional): additional kwargs to pass to the Task constructor

methods:                                                                                                                                                       

prefect.tasks.twitter.twitter.LoadTweetReplies.run

(user=None, tweet_id=None, credentials=None)[source]

Args:

  • user (str): a Twitter user
  • tweet_id (str): a tweet ID; replies to this tweet will be retrieved
  • credentials(dict): a JSON document with four keys: "api_key", "api_secret", "access_token", and "access_token_secret".



This documentation was auto-generated from commit n/a
on July 1, 2021 at 18:35 UTC