TwitterTweetReader #
Bases: BasePydanticReader
Twitter tweets reader.
Read tweets of user twitter handle.
Check 'https://developer.twitter.com/en/docs/twitter-api/ getting-started/getting-access-to-the-twitter-api' on how to get access to twitter API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
bearer_token
|
str
|
bearer_token that you get from twitter API. |
required |
num_tweets
|
Optional[int]
|
Number of tweets for each user twitter handle. Default is 100 tweets. |
100
|
Source code in llama-index-integrations/readers/llama-index-readers-twitter/llama_index/readers/twitter/base.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
|
load_data #
load_data(twitterhandles: List[str], num_tweets: Optional[int] = None, **load_kwargs: Any) -> List[Document]
Load tweets of twitter handles.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
twitterhandles
|
List[str]
|
List of user twitter handles to read tweets. |
required |
Source code in llama-index-integrations/readers/llama-index-readers-twitter/llama_index/readers/twitter/base.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
|