add account methods to readme
This commit is contained in:
parent
d4ea0c9848
commit
870947b6c4
1 changed files with 35 additions and 19 deletions
54
README.md
54
README.md
|
|
@ -48,6 +48,7 @@ You can use this library to get tweets, profiles, and trends trivially.
|
||||||
- [Create scheduled tweet](#create-scheduled-tweet)
|
- [Create scheduled tweet](#create-scheduled-tweet)
|
||||||
- [Delete scheduled tweet](#delete-scheduled-tweet)
|
- [Delete scheduled tweet](#delete-scheduled-tweet)
|
||||||
- [Upload media](#upload-media)
|
- [Upload media](#upload-media)
|
||||||
|
- [Account](#account)
|
||||||
- [Connection](#connection)
|
- [Connection](#connection)
|
||||||
- [Proxy](#proxy)
|
- [Proxy](#proxy)
|
||||||
- [HTTP(s)](#https)
|
- [HTTP(s)](#https)
|
||||||
|
|
@ -151,7 +152,7 @@ if !scraper.IsLoggedIn() {
|
||||||
|
|
||||||
### OpenAccount
|
### OpenAccount
|
||||||
|
|
||||||
> [!WARNING]
|
> [!WARNING]
|
||||||
> Deprecated. Nerfed by twitter, doesn't support new endpoints.
|
> Deprecated. Nerfed by twitter, doesn't support new endpoints.
|
||||||
|
|
||||||
`LoginOpenAccount` is now limited to one new account per month for IP address.
|
`LoginOpenAccount` is now limited to one new account per month for IP address.
|
||||||
|
|
@ -312,7 +313,7 @@ tweets, cursor, err := scraper.FetchMediaTweets("taylorswift13", 20, cursor)
|
||||||
|
|
||||||
### Get bookmarks
|
### Get bookmarks
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Requires authentication!
|
> Requires authentication!
|
||||||
|
|
||||||
500 requests / 15 minutes
|
500 requests / 15 minutes
|
||||||
|
|
@ -337,7 +338,7 @@ tweets, cursor, err := scraper.FetchBookmarks(20, cursor)
|
||||||
|
|
||||||
### Get home tweets
|
### Get home tweets
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Requires authentication!
|
> Requires authentication!
|
||||||
|
|
||||||
500 requests / 15 minutes
|
500 requests / 15 minutes
|
||||||
|
|
@ -362,7 +363,7 @@ tweets, cursor, err := scraper.FetchHomeTweets(20, cursor)
|
||||||
|
|
||||||
### Get foryou tweets
|
### Get foryou tweets
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Requires authentication!
|
> Requires authentication!
|
||||||
|
|
||||||
500 requests / 15 minutes
|
500 requests / 15 minutes
|
||||||
|
|
@ -387,7 +388,7 @@ tweets, cursor, err := scraper.FetchForYouTweets(20, cursor)
|
||||||
|
|
||||||
### Search tweets
|
### Search tweets
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Requires authentication!
|
> Requires authentication!
|
||||||
|
|
||||||
150 requests / 15 minutes
|
150 requests / 15 minutes
|
||||||
|
|
@ -438,7 +439,7 @@ profile, err := scraper.GetProfileByID("17919972")
|
||||||
|
|
||||||
### Search profile
|
### Search profile
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Requires authentication!
|
> Requires authentication!
|
||||||
|
|
||||||
150 requests / 15 minutes
|
150 requests / 15 minutes
|
||||||
|
|
@ -468,7 +469,7 @@ trends, err := scraper.GetTrends()
|
||||||
|
|
||||||
### Get following
|
### Get following
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Requires authentication!
|
> Requires authentication!
|
||||||
|
|
||||||
500 requests / 15 minutes
|
500 requests / 15 minutes
|
||||||
|
|
@ -480,7 +481,7 @@ users, cursor, err := scraper.FetchFollowing("Support", 20, cursor)
|
||||||
|
|
||||||
### Get followers
|
### Get followers
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Requires authentication!
|
> Requires authentication!
|
||||||
|
|
||||||
50 requests / 15 minutes
|
50 requests / 15 minutes
|
||||||
|
|
@ -492,7 +493,7 @@ users, cursor, err := scraper.FetchFollowers("Support", 20, cursor)
|
||||||
|
|
||||||
### Get space
|
### Get space
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Requires authentication!
|
> Requires authentication!
|
||||||
|
|
||||||
500 requests / 15 minutes
|
500 requests / 15 minutes
|
||||||
|
|
@ -523,7 +524,7 @@ space, err := scraper.GetSpace(spaceId)
|
||||||
|
|
||||||
### Like tweet
|
### Like tweet
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Requires authentication!
|
> Requires authentication!
|
||||||
|
|
||||||
500 requests / 15 minutes (combined with `UnlikeTweet` method)
|
500 requests / 15 minutes (combined with `UnlikeTweet` method)
|
||||||
|
|
@ -534,7 +535,7 @@ err := scraper.LikeTweet("tweet_id")
|
||||||
|
|
||||||
### Unlike tweet
|
### Unlike tweet
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Requires authentication!
|
> Requires authentication!
|
||||||
|
|
||||||
500 requests / 15 minutes (combined with `LikeTweet` method)
|
500 requests / 15 minutes (combined with `LikeTweet` method)
|
||||||
|
|
@ -545,7 +546,7 @@ err := scraper.UnlikeTweet("tweet_id")
|
||||||
|
|
||||||
### Create tweet
|
### Create tweet
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Requires authentication!
|
> Requires authentication!
|
||||||
|
|
||||||
```golang
|
```golang
|
||||||
|
|
@ -573,7 +574,7 @@ tweet, err = scraper.CreateTweet(twitterscraper.NewTweet{
|
||||||
|
|
||||||
### Delete tweet
|
### Delete tweet
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Requires authentication!
|
> Requires authentication!
|
||||||
|
|
||||||
```golang
|
```golang
|
||||||
|
|
@ -582,7 +583,7 @@ err := testScraper.DeleteTweet("1810458885008105870");
|
||||||
|
|
||||||
### Create retweet
|
### Create retweet
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Requires authentication!
|
> Requires authentication!
|
||||||
|
|
||||||
Returns retweet id, which is not the same as source tweet id.
|
Returns retweet id, which is not the same as source tweet id.
|
||||||
|
|
@ -593,7 +594,7 @@ retweetId, err := testScraper.CreateRetweet("1792634158977568997");
|
||||||
|
|
||||||
### Delete retweet
|
### Delete retweet
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Requires authentication!
|
> Requires authentication!
|
||||||
|
|
||||||
To delete retweet use source tweet id instead retweet id.
|
To delete retweet use source tweet id instead retweet id.
|
||||||
|
|
@ -604,7 +605,7 @@ err := testScraper.DeleteRetweet("1792634158977568997");
|
||||||
|
|
||||||
### Get scheduled tweets
|
### Get scheduled tweets
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Requires authentication!
|
> Requires authentication!
|
||||||
|
|
||||||
500 requests / 15 minutes
|
500 requests / 15 minutes
|
||||||
|
|
@ -615,7 +616,7 @@ tweets, err := scraper.FetchScheduledTweets()
|
||||||
|
|
||||||
### Create scheduled tweet
|
### Create scheduled tweet
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Requires authentication!
|
> Requires authentication!
|
||||||
|
|
||||||
500 requests / 15 minutes
|
500 requests / 15 minutes
|
||||||
|
|
@ -630,7 +631,7 @@ tweets, err := scraper.CreateScheduledTweet(twitterscraper.TweetSchedule{
|
||||||
|
|
||||||
### Delete scheduled tweet
|
### Delete scheduled tweet
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Requires authentication!
|
> Requires authentication!
|
||||||
|
|
||||||
500 requests / 15 minutes
|
500 requests / 15 minutes
|
||||||
|
|
@ -641,7 +642,7 @@ err := scraper.DeleteScheduledTweet("123")
|
||||||
|
|
||||||
### Upload media
|
### Upload media
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> Requires authentication!
|
> Requires authentication!
|
||||||
|
|
||||||
50 requests / 15 minutes
|
50 requests / 15 minutes
|
||||||
|
|
@ -652,6 +653,21 @@ Uploads photo, video or gif for further posting or scheduling. Expires in 24 hou
|
||||||
media, err := scraper.UploadMedia("./files/movie.mp4")
|
media, err := scraper.UploadMedia("./files/movie.mp4")
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Account
|
||||||
|
> Requires authentication!
|
||||||
|
|
||||||
|
To get current account settings use `GetAccountSettings` method.
|
||||||
|
|
||||||
|
```golang
|
||||||
|
settings, err := scraper.GetAccountSettings()
|
||||||
|
```
|
||||||
|
|
||||||
|
If you use session with multiaccount you can use `GetAccountList` method to get slice of all accounts.
|
||||||
|
|
||||||
|
```golang
|
||||||
|
accounts, err := scraper.GetAccountList()
|
||||||
|
```
|
||||||
|
|
||||||
## Connection
|
## Connection
|
||||||
|
|
||||||
### Proxy
|
### Proxy
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue