add GetTweetRetweeters to readme

This commit is contained in:
Valentine 2024-08-05 18:05:02 +03:00
parent a2938f52db
commit 171e94e5f5
2 changed files with 20 additions and 2 deletions

View file

@ -1,5 +1,11 @@
# Changelog # Changelog
## v0.0.11
05.08.2024
- Added method `GetTweetRetweeters`
## v0.0.10 ## v0.0.10
01.08.2024 01.08.2024

View file

@ -23,6 +23,7 @@ You can use this library to get tweets, profiles, and trends trivially.
- [Methods](#methods) - [Methods](#methods)
- [Get tweet](#get-tweet) - [Get tweet](#get-tweet)
- [Get tweet replies](#get-tweet-replies) - [Get tweet replies](#get-tweet-replies)
- [Get tweet retweeters](#get-tweet-retweeters)
- [Get user tweets](#get-user-tweets) - [Get user tweets](#get-user-tweets)
- [Get user medias](#get-user-medias) - [Get user medias](#get-user-medias)
- [Get bookmarks](#get-bookmarks) - [Get bookmarks](#get-bookmarks)
@ -227,7 +228,7 @@ tweets, cursors, err := scraper.GetTweetReplies("1328684389388185600", cursor)
To get all replies and replies of replies for tweet you can iterate for all cursors. To get only direct replies check if `cursor.ThreadID` is equal your tweet id. To get all replies and replies of replies for tweet you can iterate for all cursors. To get only direct replies check if `cursor.ThreadID` is equal your tweet id.
```golang ```golang
tweets, cursors, err := testScraper.GetTweetReplies("1328684389388185600", "") tweets, cursors, err := scraper.GetTweetReplies("1328684389388185600", "")
if err != nil { if err != nil {
panic(err) panic(err)
} }
@ -236,7 +237,7 @@ for {
if len(cursors) > 0 { if len(cursors) > 0 {
var cursor *twitterscraper.ThreadCursor var cursor *twitterscraper.ThreadCursor
cursor, cursors = cursors[0], cursors[1:] cursor, cursors = cursors[0], cursors[1:]
moreTweets, moreCursors, err := testScraper.GetTweetReplies(tweetId, cursor.Cursor) moreTweets, moreCursors, err := scraper.GetTweetReplies(tweetId, cursor.Cursor)
if err != nil { if err != nil {
// you can check here if rate limited, await and repeat request // you can check here if rate limited, await and repeat request
panic(err) panic(err)
@ -251,6 +252,17 @@ for {
} }
``` ```
### Get tweet retweeters
500 requests / 15 minutes
Returns a list of users who have retweeted the tweet.
```golang
var cursor string
retweeters, cursor, err := scraper.GetTweetRetweeters("1328684389388185600", 20, cursor)
```
### Get user tweets ### Get user tweets
150 requests / 15 minutes 150 requests / 15 minutes