Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add all missing v2 endpoints (as of 2021-07-30) #50

Merged
merged 27 commits into from
Aug 15, 2021

Conversation

alkihis
Copy link
Collaborator

@alkihis alkihis commented Aug 6, 2021

Major changes:

  • New endpoints for v2 client, including doc, new paginator and related typings

    • .tweetLikedBy, users that liked a tweet (no pagination, as Twitter does not supports it)
    • .userLikedTweets, last tweets liked by a user (with a dedicated paginator)
    • .tweetRetweetedBy , users that retweeted a tweet (no pagination, as Twitter does not supports it)
    • .tweetCountRecent and .tweetCountAll, endpoints related to tweet counts for a designated search, splitted by time segments
    • .retweet and .unretweet, to... retweet and remove retweet from a tweet
    • .mute and .unmute, to... mute and unmute a specific user
    • .userBlockingUsers, to list (with a paginator) blocked users of authenticated user
  • .followers and .following for v2 can now returns user paginators. To not break anything, you should give { asPaginator: true } in options object to enable this feature. Old "classic" way could be removed later in a hypothetical 2.0 version as a breaking change.

  • Fix several problems related to auto-reconnect for stream

    • Brand new detection of "lost connection", without any Twitter signal within 2 minutes (by default), connection will be "lost"
    • Fix problems that prevent stream to be properly restart (and events to be emitted)
    • Three new events to indicate stream status: ConnectionLost, ReconnectAttempt and Reconnected
  • Handle stream errors deliveries in a dedicated .DataError event (see Reconnect on error #49 for details).

    • Only works for v2 streams for now
    • Error detection is made by a function given to the TweetStream instance (payloadIsError)
    • This is a possible bc-break, as it remove error delivery to .Data handlers

@alkihis alkihis requested a review from PLhery August 6, 2021 20:20
@alkihis alkihis mentioned this pull request Aug 7, 2021
@alkihis alkihis mentioned this pull request Aug 10, 2021
@alkihis alkihis removed the request for review from PLhery August 15, 2021 12:45
@alkihis alkihis merged commit f188957 into master Aug 15, 2021
@alkihis alkihis deleted the feature/30-07-21-missing-v2-endpoints branch August 15, 2021 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant