twitter_api_v2 3.0.1 twitter_api_v2: ^3.0.1 copied to clipboard
The lightweight and powerful wrapper library for Twitter API v2.0 written in Dart language. It works cross-platform.
Release Note #
v3.0.0 #
- Improved specification of data returned from POST, DELETE, and PUT communication endpoints. The previous specification always returned true regardless of whether the process was successful or not, but now returns false if an
errors
object exists in the response. (#381)
Breaking Changes #
- Changed return type of
destroyFilteringRules
fromFilteringRuleMeta
tobool
. This is because there is no use for theFilteringRuleMeta
object that was returned after the deletion of a filtering rule in the previous specification. If the deletion succeeds, true is returned; if the deletion fails for some reason, false is returned. (#382)
v2.10.0 #
- Fixed to raise
TwitterException
if response object cannot be converted to JSON. (#347) - Enforced the specification of access token in
OAuth 2.0
orOAuth 1.0a
method when creating an instance ofTwitterApi
object. If either access token is not passed, anArgumentError
will be thrown. (#352) - Added
UnauthorizedException
. Thrown when unauthorized with the specified access token. (#348) - Added Automatic Retry feature. Automatic retry can be enabled by setting
RetryConfig
when creating theTwitterApi
object. IfRetryConfig
is not passed to theTwitterApi
object, automatic retry will not be triggered. (#251)- Regular Intervals
- Exponential Backoff
- Exponential Backoff and Jitter
v2.9.0 #
- Added
state
parameter forSpacesService.search
. (#324) - Added
topicFields
parameters. (#185)- GET /2/spaces/search
- GET /2/spaces
- GET /2/spaces/:id
- GET /2/spaces/by/creator_ids
- Added
SpaceExpansion.topicIds
. (#185) - Added
ended
element forSpaceState
. (#333) - Removed HTTP status code checking process. With this modification, no exception will be thrown if, for example, you try to retweet a particular tweet and the tweet has already been deleted by its owner. However, a
TwitterException
will still be thrown if there is no Data field in the response. (#329) - Added
RateLimitExceededException
. (#331)
v2.8.1 #
- Changed the field type of
TweetPollParam
'sdurationInMinutes
toDuration
and changed the name toduration
. (#322)
v2.8.0 #
Breaking Changes #
- Migration is required for fields that existed in previous versions due to objectification of some of the
createTweet
request parameters. (#304)- Use
TweetMediaParam
object to specifymediaIds
andtaggedUserIds
. - Use
TweetReplyParam
object to specifyinReplyToTweetId
- Use
- Migration is required for
createFilteringRules
. (#312)- Use
FilteringRuleParam
object to specify filtering rules.
- Use
Bug Fixes #
- Removed
expansions
parameter fromcreateTweet
method because this is not the supported parameter. (#288)
New Features #
- Added
timeout
option toTwitterApi
. The default timeout duration is 10 seconds. (#252) - Added
sortOrder
parameter toTweetsService.searchRecent
andTweetsService.searchAll
. (#284) - Added
startTime
andendTime
parameters. (#240)- GET /2/tweets/search/all
- GET /2/tweets/search/recent
- GET /2/users/:id/mentions
- GET /2/users/:id/timelines/reverse_chronological
- GET /2/users/:id/tweets
- GET /2/tweets/counts/all
- GET /2/tweets/counts/recent
- Added
variants
field toMediaData
object. You can get this field by usingMediaField.variants
. (#265) - Added
sinceTweetId
parameter. (#285)- GET /2/tweets/search/all
- GET /2/tweets/search/recent
- Added
untilTweetId
parameter. (#286)- GET /2/tweets/search/all
- GET /2/tweets/search/recent
- Added
directMessageDeepLink
parameter tocreateTweet
. (#279) - Added
geo
parameter tocreateTweet
. (#280)(#304) - Added
poll
parameter tocreateTweet
. (#282)(#304) - Added objects for request parameter of
createTweet
. (#304)TweetMediaParam
TweetGeoParam
TweetPollParam
TweetReplyParam
- Added
sinceTweetId
anduntilTweetId
parameters tocountAll
andcountRecent
. (#311)- GET /2/tweets/counts/all
- GET /2/tweets/counts/recent
- Added
granularity
parameter tocountAll
andcountRecent
. (#310)- GET /2/tweets/counts/all
- GET /2/tweets/counts/recent
- Added
sinceTweetId
anduntilTweetId
parameters toTweetsService.lookupTweets
. (#309) - Added
excludes
parameter toTweetsService.lookupTweets
. (#308) - Added
sinceTweetId
anduntilTweetId
parameters tolookupHomeTimeline
. (#307) - Added
excludes
parameter tolookupHomeTimeline
. (#306) - Added
sinceTweetId
anduntilTweetId
parameters tolookupMentions
. (#305)
v2.7.0 #
- Added metrics field for
TweetField
. (#268)non_public_metrics
organic_metrics
promoted_metrics
- The
toJson
method of the response data object has been improved. Nested objects are now converted to JSON at the same time as the parent object'stoJson
. (#272) - Added
toJson
method toTwitterResponse
. (#274)
v2.6.0 #
- Added
FilteredStreamResponse
as the return type ofFiltered Stream
endpoint. And now we can see the IDs and tags of the rules matched in the streaming from theFilteredStreamResponse.matchingRules
field. TheFilteredStreamResponse
extendsTwitterResponse
, so there are no destructive changes. (#226) - Added translated READMEs. (#213)
- Japanese
- French
- Vietnamese
- Bengali
- Added
mediaFields
arguments. (#183)- GET /2/users/:id/bookmarks
- GET /2/tweets/search/stream
- GET /2/tweets/:id/liking_users
- GET /2/users/:id/liked_tweets
- GET /2/tweets/:id/quote_tweets
- GET /2/tweets/:id/retweeted_by
- GET /2/tweets/search/all
- GET /2/tweets/search/recent
- GET /2/users/:id/mentions
- GET /2/users/:id/timelines/reverse_chronological
- GET /2/users/:id/tweets
- GET /2/tweets
- GET /2/tweets/:id
- GET /2/tweets/sample/stream
- GET /2/spaces/:id/buyers
- GET /2/spaces/:id/tweets
- Added
mediaFields
arguments. (#186)- GET /2/users/:id/followed_lists
- GET /2/lists/:id
- GET /2/users/:id/owned_lists
- GET /2/users/:id/list_memberships
- GET /2/users/:id/pinned_lists
v2.5.0 #
- Added
spaceFields
argument. (#184)- GET /2/spaces/search
- GET /2/spaces
- GET /2/spaces/:id
- GET /2/spaces/by/creator_ids
- Added
pollFields
argument. (#181)- GET /2/users/:id/bookmarks
- GET /2/tweets/search/stream
- GET /2/tweets/:id/liking_users
- GET /2/users/:id/liked_tweets
- GET /2/tweets/:id/quote_tweets
- GET /2/tweets/:id/retweeted_by
- GET /2/tweets/search/all
- GET /2/tweets/search/recent
- GET /2/users/:id/mentions
- GET /2/users/:id/timelines/reverse_chronological
- GET /2/users/:id/tweets
- GET /2/tweets
- GET /2/tweets/:id
- GET /2/tweets/sample/stream
- GET /2/spaces/:id/buyers
- GET /2/spaces/:id/tweets
- Added
placeFields
argument. (#182)- GET /2/users/:id/bookmarks
- GET /2/tweets/search/stream
- GET /2/tweets/:id/liking_users
- GET /2/users/:id/liked_tweets
- GET /2/tweets/:id/quote_tweets
- GET /2/tweets/:id/retweeted_by
- GET /2/tweets/search/all
- GET /2/tweets/search/recent
- GET /2/users/:id/mentions
- GET /2/users/:id/timelines/reverse_chronological
- GET /2/users/:id/tweets
- GET /2/tweets
- GET /2/tweets/:id
- GET /2/tweets/sample/stream
- GET /2/spaces/:id/buyers
- GET /2/spaces/:id/tweets
PlaceData
class is migrated toGeo
class, and updatedPlaceData
parameters.PlaceCoordinates
class is migrated toGeoCoordinates
class, and updatedPlaceCoordinates
parameters.- Changed the type of
lang
field fromString?
toTweetLanguage?
. (#207)
v2.4.2 #
- Fixed field names in
UserData
. (#202)- From
protected
toisProtected
. - From
verified
toisVerified
.
- From
v2.4.0 #
- Added
userFields
argument. (#180)- GET /2/users/:id/bookmarks
- GET /2/tweets/search/stream
- GET /2/tweets/:id/liking_users
- GET /2/users/:id/liked_tweets
- GET /2/tweets/:id/quote_tweets
- GET /2/tweets/search/all
- GET /2/tweets/search/recent
- GET /2/users/:id/mentions
- GET /2/users/:id/timelines/reverse_chronological
- GET /2/users/:id/tweetsGET /2/tweets
- GET /2/tweets/:id
- GET /2/tweets/sample/stream
- GET /2/users/:id/blocking
- GET /2/users/:id/followers
- GET /2/users/:id/following
- GET /2/users/:id/muting
- GET /2/users
- GET /2/users/:id
- GET /2/users/by
- GET /2/users/by/username/:username
- GET /2/users/me
- GET /2/spaces/search
- GET /2/spaces
- GET /2/spaces/:id
- GET /2/spaces/:id/buyers
- GET /2/spaces/:id/tweets
- GET /2/spaces/by/creator_ids
- GET /2/lists/:id/tweets
- GET /2/lists/:id/followers
- GET /2/users/:id/followed_lists
- GET /2/lists/:id
- GET /2/users/:id/owned_lists
- GET /2/lists/:id/members
- GET /2/users/:id/list_memberships
- GET /2/users/:id/pinned_lists
v2.3.0 #
- Added
tweetFields
argument. (#179)- GET /2/users/:id/bookmarks
- GET /2/tweets/search/stream
- GET /2/tweets/:id/liking_users
- GET /2/users/:id/liked_tweets
- GET /2/tweets/:id/quote_tweets
- GET /2/tweets/:id/retweeted_by
- GET /2/tweets/search/all
- GET /2/tweets/search/recent
- GET /2/users/:id/mentions
- GET /2/users/:id/timelines/reverse_chronological
- GET /2/users/:id/tweets
- GET /2/tweets
- GET /2/tweets/:id
- GET /2/tweets/sample/stream
- GET /2/users/:id/blocking
- GET /2/users/:id/followers
- GET /2/users/:id/following
- GET /2/users/:id/muting
- GET /2/users
- GET /2/users/:id
- GET /2/users/by
- GET /2/users/by/username/:username
- GET /2/users/me
- GET /2/spaces/:id/buyers
- GET /2/spaces/:id/tweets
- GET /2/lists/:id/tweets
- GET /2/lists/:id/members
- Changed object name from
ReferencedTweetData
toReferencedTweet
. - Changed field type of
type
inReferencedTweet
toTweetType
fromString
. - Changed field type of
type
inMediaData
toMediaType
fromString.
- Added
key
field toMediaData
. It represents a unique identifier of the media.
v2.2.0 #
- Added
Reverse Chronological Timelines
endpoint. (#164)- GET /2/users/:id/timelines/reverse_chronological
- Added
expansions
argument toUsersService
. (#142)- GET /2/users/:id/blocking
- GET /2/users/:id/followers
- GET /2/users/:id/following
- GET /2/users/:id/muting
- GET /2/users
- GET /2/users/:id
- GET /2/users/by
- GET /2/users/by/username/:username
- GET /2/users/me
- Added
expansions
argument toSpacesService
. (#171)- GET /2/spaces/search
- GET /2/spaces
- GET /2/spaces/:id
- GET /2/spaces/:id/buyers
- GET /2/spaces/:id/tweets
- GET /2/spaces/by/creator_ids
- Added
expansions
argument toListsService
. (#172)- GET /2/lists/:id/tweets
- GET /2/lists/:id/followers
- GET /2/users/:id/followed_lists
- GET /2/lists/:id
- GET /2/users/:id/owned_lists
- GET /2/lists/:id/members
- GET /2/users/:id/list_memberships
- GET /2/users/:id/pinned_lists
- Fixed method name from
tweetsService.connectVolumeStreams
totweetsService.connectVolumeStream
. - Fixed return type of
tweetsService.connectVolumeStream
fromFuture<Stream<TweetData>>
toFuture<Stream<TwitterResponse<TweetData, void>>>
. - Added
Filtered Stream
endpoint. (#4)- GET /2/tweets/search/stream
- GET /2/tweets/search/stream/rules
- POST /2/tweets/search/stream/rules
v2.1.0 #
- Added
expansions
argument toTweetsService
. (#141) - Added expanded fields to
TweetData
. (#141)authorId
inReplyToUserId
referencedTweets
entities
attachments
geo
- Added
includes
field toTwitterResponse
. (#144) - With the addition of the
includes
field toTwitterResponse
, the following objects have been added. (#144)MediaData
PollData
- Added Volume Stream endpoint. (#14)
- GET /2/tweets/sample/stream
v2.0.0 #
- Exposed service classes. (#122
TweetsService
UsersService
ListsService
SpacesService
ComplianceService
- Added arguments to
tweetsService.createTweet
. (#130) (#90)inReplyToTweetId
replySetting
mediaIds
taggedUserIds
- Improved processing when the data field does not exist in the response body returned from the Twitter API. (#124)
- In previous versions,
POST
andDELETE
communications for deleted content would raise aTwitterException
, but this release has been modified to always return a boolean instead of an exception in this case.
- In previous versions,
- Internal processing has been refactored to improve scalability and maintainability. There are no disruptive changes as a result of this refactoring.
- Added convenience utility for OAuth. (#102)
OAuthUtils.generateAppOnlyBearerToken
v1.8.0 #
- Added Lists Manage endpoints. (#30)
- DELETE /2/lists/:id
- PUT /2/lists/:id
- POST /2/lists
- Added Lists Follows endpoints. (#27)
- DELETE /2/users/:id/followed_lists/:list_id
- GET /2/lists/:id/followers
- GET /2/users/:id/followed_lists
- POST /2/users/:id/followed_lists
- Added Lists Members endpoints. (#29)
- DELETE /2/lists/:id/members/:user_id
- GET /2/lists/:id/members
- GET /2/users/:id/list_memberships
- POST /2/lists/:id/members
v1.7.0 #
- Added Tweets Timelines endpoints. (#11)
- GET /2/users/:id/mentions
- GET /2/users/:id/tweets
- Added Users Blocks endpoints. (#20)
- DELETE /2/users/:source_user_id/blocking/:target_user_id
- GET /2/users/:id/blocking
- POST /2/users/:id/blocking
- Added Lists Pinnings endpoints. (#31)
- DELETE /2/users/:id/pinned_lists/:list_id
- GET /2/users/:id/pinned_lists
- POST /2/users/:id/pinned_lists
- Added Lists Tweet Lookup endpoint. (#26)
- GET /2/lists/:id/tweets
- Refactored method names. Prefixes for methods that perform
GET
communication other than the search endpoint have been unified withlookup
. This makes it a destructive change, but please refer to the following correspondence table for details of the change.- Tweets Service
- From
likingUsers
tolookupLikingUsers
- From
likingTweets
tolookupLikedTweets
- From
retweetedBy
tolookupRetweetedUsers
- From
quoteTweets
tolookupQuoteTweets
- From
bookmarks
tolookupBookmarks
- From
- Users Service
- From
followers
tolookupFollowers
- From
followings
tolookupFollowings
- From
mutingUsers
tolookupMutingUsers
- From
- Lists Service
- From
pinnedLists
tolookupPinnedLists
- From
- Tweets Service
v1.6.0 #
- Fixed a bug in
DELETE
communication. - Improved error message from
TwitterException
. (#93) - Added Batch Compliance endpoints. (#32)
- GET /2/compliance/jobs
- GET /2/compliance/jobs/:id
- POST /2/compliance/jobs
- Added Users Mutes endpoints. (#22)
- DELETE /2/users/:source_user_id/muting/:target_user_id
- GET /2/users/:id/muting
- POST /2/users/:id/muting
- Added Tweets Hide Replies endpoints. (#5)
- PUT /2/tweets/:id/hidden
v1.5.0 #
- Renamed method name in TweetsService. (#79)
- Renamed method from
tweetsService.lookupTweet
totweetsService.lookupById.
- Renamed method from
tweetsService.lookupTweets
totweetsService.lookupByIds.
- Renamed method from
- Added Spaces Lookup endpoints. (#25)
- GET /2/spaces
- GET /2/spaces/:id
- GET /2/spaces/:id/buyers
- GET /2/spaces/:id/tweets
- GET /2/spaces/by/creator_ids
- Added Lists Lookup endpoints. (#28)
- GET /2/lists/:id
- GET /2/users/:id/owned_lists
v1.4.0 #
- Fixed response handling.
- The HTTP status of a response was regarded as an exception for data other than 200, but the HTTP status in the 200s is now regarded as a normal completion.
- Improved and added parameters for endpoints already implemented in this library. (#66)
- Added parameters to
tweetsService.createTweet
.quoteTweetId
forSuperFollowersOnly
- Added a parameter to
tweetsService.linkingUsers
.maxResults
- Added a parameter to
tweetsService.linkingTweets
.maxResults
- Added a parameter to
tweetsService.retweetedBy
.maxResults
- Added a parameter to
tweetsService.quoteTweets
.maxResults
- Added a parameter to
tweetsService.searchRecent
.maxResults
- Added a parameter to
tweetsService.searchAll
.maxResults
- Added a parameter to
usersService.followers
.maxResults
- Added a parameter to
usersService.followings
.maxResults
- Added parameters to
v1.3.0 #
- Improved the error message from
TwitterException
. (#48) - Added
previousToken
totweet_meta
andtweet_count_meta
, and addedpaginationToken
ornextToken
argument for endpoints that support pagination. (#60) - Added
previousToken
touser_meta
, and addedpaginationToken
argument for endpoints that support pagination. (#60)
v1.2.0 #
- Fixed typo from
tweetService
totweetsService
inTwitterApi
. - Improved error handling. (#41)
v1.1.0 #
- Added Tweet Counts endpoints. (#12)
- GET /2/tweets/counts/all
- GET /2/tweets/counts/recent
- Added Tweet Bookmarks endpoints. (#2)
- GET /2/tweets/counts/all
- GET /2/tweets/counts/recent
- Added Users Lookup endpoints. (#23)
- GET /2/users
- GET /2/users/:id
- GET /2/users/by
- GET /2/users/by/username/:username
- GET /2/users/me
- Added Spaces Search endpoints. (#23)
- GET /2/spaces/search
v1.0.0 #
- Specification changes and improvements have been made to the authentication method. (#44)
- Added Quote Tweets endpoint. (#8)
- GET /2/tweets/:id/quote_tweets
- Added Tweets Search endpoints. (#10)
- GET /2/tweets/search/all
- GET /2/tweets/search/recent
- Added Tweets Lookup endpoints. (#13)
- GET /2/tweets
- GET /2/tweets/:id
v0.1.0 #
- Added Tweets Likes endpoints. (#6)
- DELETE /2/users/:id/likes/:tweet_id
- GET /2/tweets/:id/liking_users
- GET /2/users/:id/liked_tweets
- POST /2/users/:id/likes
- Added Tweets Manage endpoints. (#7)
- DELETE /2/tweets/:id
- POST /2/tweets
- Added Tweets Retweet endpoints. (#9)
- DELETE /2/users/:id/retweets/:source_tweet_id
- GET /2/tweets/:id/retweeted_by
- POST /2/users/:id/retweets
- Added Users Follows endpoints. (#21)
- DELETE /2/users/:source_user_id/following/:target_user_id
- GET /2/users/:id/followers
- GET /2/users/:id/following
- POST /2/users/:id/following
v0.0.1 #
- First Release