Releases: ropensci-archive/rtweet
rtweet 2.0.0
-
This is a major release to signal the end of API v1.1 functions.
-
Fix a problem with
auth_sitrep()
not correctly handling old tokens. -
Since httr2 > 0.2.3, rtweet refreshes OAuth 2.0 tokens automatically.
It is no longer needed to userrtweet_oauth2()
, authentication is fully handled by httr2. -
Document the deprecated functions from API v1.1 to API v2: see
help("rtweet-deprecated", "rtweet")
. -
New function
client_clean()
to remove client's data (together withauth_clean()
they leave the user cache empty).
rtweet 1.2.1
-
Fix
auth_sitrep()
to work well with OAuth2 tokens. -
Added new function
tweet_quoted()
to search who tweets quoting a tweet. -
New
tweet_post()
andtweet_delete()
to post and delete tweets to work with the free product. -
Fix problems with changes on
is.atomic(NULL)
.
rtweet 1.2.0
Authentication changes
-
New
client_*
functions to save, set and use a client app using Twitter API
via the new authentication mechanismrtweet_oauth2()
(see below).
It has a helper function for the scopes the client is allowed to doset_scopes()
.
Endpoint have different scope requirements. -
New authentication mechanism
rtweet_oauth2()
required by some endpoints.
Only valid for 2 hours until it is automatically renewed, but it is left to
the user to save it every time it is renewed.
New endpoints using API v2
New endpoints to retrieve data from twitter, no action is performed (no blocking, muting, posting new tweets...):
-
New list endpoints:
list_expansions()
,list_fields()
,list_followers()
,
list_get()
,list_members()
,list_membership()
,list_tweets()
. -
New tweet endpoints:
tweet_get()
,tweet_liking_users()
,tweet_retweeted_by()
. -
New user endpoints:
user_blocked()
,user_bookmarks()
,user_by_username()
,
user_following()
,user_followers()
,user_liked_tweets()
,
user_list_follows()
,user_lists()
,user_mentions()
,user_search()
,
user_self()
,user_timeline()
,user_tweets()
. -
New statistic endpoints:
tweet_counts_recent()
,tweet_counts_all()
.
Other changes
-
Small breaking change:
expansions
andfields
arguments now useNA
for all andNULL
for none. -
New functions to set expansions and fields for the new functions:
set_expansions()
,set_fields()
. -
Fixed a bug that prevented
auth_setup_default()
to work (#756 and #744) -
Fixed a bug so that the streaming functions use the current token.
rtweet 1.1.0
- Fixed a bug that prevented posting multiple media in the same tweet.
- Argument premium is correctly handled in
search_fullarchive
andsearch_30day
(#720). - ts_plot uses the first two columns of grouped data.frames for plotting (#724 and #727).
- get_timeline returns user data for multiple accounts (#723).
- network_data now handles deleted accounts (#730).
- retryonratelimit works again on paginated endpoints (#732).
- Fixed multiple bugs that prevented
auth_sitrep()
to work in some cases. - Provided
rbind
and subsetting methods ([
) for rtweet new classes. - Fixed a bug about sending a private message (#735).
- Provided a function
clean_tweets()
for cleaning entities from the text of tweets (#721). - New helper methods for extracting data from entities in tweets:
entity()
. - Columns of the parsed output are now always in the same order (#740).
- New methods to retrieve
ids()
from multiple classes and print nicer inpost_tweet()
(#452). post_tweet()
now invisible returns the tweet information.- Provides initial support for API v2 for streaming endpoints:
filtered_stream()
andsample_stream()
, including adding rules
stream_add_rules()
andstream_rm_rules()
. - Deprecated old stream function.
- Handle more graciously if a whole data.frame is used for
lookup_tweets()
.
rtweet 1.0.2
rtweet 1.0.2
- Exported again
tweets_with_users
andusers_with_tweets
because Twitmo depends on them.
rtweet 1.0.1
-
Fixed issue with .Rbuilignore and vignettes
-
Reduced fixtures sizes by limiting the page size to the number of requests if
it is smaller than the default page size.
rtweet 1.0.0
Breaking changes
-
Data returned by rtweet is nested and uses the same names provided by
the Twitter API. It doesn't compute or add new columns as it did previously. -
emojis, langs and stopwordslangs data are no longer provided by rtweet.
-
get_friends()
andget_followers()
return similar formatted output with
two columns "from_id" and "to_id" (#308, @alexpghayes). -
All paginated functions that don't return tweets now use a consistent
pagination interface. They all store the "next cursor" in anrtweet_cursor
attribute, which will be automatically retrieved when you use thecursor
argument. -
Functions that return tweets (e.g.
get_favorites()
,get_my_timeline()
,
get_timeline()
,get_mentions()
,lists_statuses()
andsearch_tweets()
)
now expose a consistent pagination interface. They all supportmax_id
and
since_id
to find earlier and later tweets respectively, as well as
retryonratelimit
to wait as long as needed when rate limited (#510). -
suggested_slugs()
,suggested_users()
,suggested_users_all()
have been
removed as they stopped working when Twitter remove the suggested users
endpoint in June 2019 (https://twittercommunity.com/t/124732). -
parse = FALSE
always means return the raw "JSON". Previously some functions
(e.g.my_friendships()
) would return the raw HTTP response instead (#504). -
rtweet no longer re-exports the magrittr pipe
%>%
; if you want to continue
using it, you'll need tolibrary(magrittr)
orlibrary(dplyr)
(#522).
Deprecations
-
The authentication system has been rewritten, check the following section.
-
lookup_collections()
andget_collections()
has been hard deprecated
because the underlying Twitter API has been deprecated. -
previous_cursor()
has been hard deprecated. It could only be used with
lists_memberships()
and it has been dropped in favour of making regular
pagination better. -
tweet_shot()
has been hard deprecated as the screenshots do not have the
tweet. It might come back with webshot2 (#458). -
The
home
argument toget_timeline()
has been deprecated. You can only
retrieve the home timeline for the logged in user, and that's the job of
get_my_timeline()
(#550). -
Due to the changes on rtweet data format, all the functions related to
flattening the data (write_as_csv()
,save_as_csv()
flatten()
,
unflatten()
,read_twitter_csv()
) are deprecated.
Users should decide how to flatten the nested structure of the data. -
lookup_statuses()
has been deprecated in favour oflookup_tweets()
. -
as_userid()
has been deprecated since in case of ambiguity the default is
to assume a numeric string is a user id (#520). All functions now use a
singleuser_type()
function so behaviour is identical for all rtweet
functions. -
get_timelines()
has been deprecated since it does that same thing as
get_timeline()
(#509). -
stream_tweets2()
has been deprecated in favour ofstream_tweets()
.
Authentication
rtweet's authentication system has been completely written. It is now based
around three authentication options: rtweet_user()
, rtweet_app()
, and
rtweet_bot()
. Authentication no longer touches ~/.Renviron
file; instead
auth_save()
and auth_as()
allow you to explicitly save and load
authentication mechanisms from a system config directory. See vignette("auth")
for more details.
-
The httpuv package is now only suggested, since it's only needed for
interactive auth, and you'll be prompted to install it when needed. -
bearer_token()
has been deprecated in favour ofrtweet_app()
, which takes
the bearer token found in your Twitter developer portal.invalidate_bearer()
has been deprecated since this is something you should do yourself in the
Twitter developer portal. -
create_token()
has been deprecated in favour of the combination of
rtweet_user()
/rtweet_bot()
/rtweet_app()
+auth_as()
+auth_save()
. -
get_token()
andget_tokens()
have been deprecated in favour of
auth_get()
andauth_list()
. -
auth_as()
accepts path to an authentication to make it easier to use
authentications outside a user account (#602, @maelle) -
auth_setup_default()
will not only authenticate and save but use the
default token. -
The new
auth_sitrep()
helps reports the different authentications of the user
Other changes
-
Update to new rOpenSci Code of Conduct: https://ropensci.org/code-of-conduct/
-
lookup_users()
andsearch_users()
now returns a data frame containing
all information about each user (not their latest tweet). If you want to get
that data you can usetweets_data()
. -
rtweet 1.0.0 implements a consistent strategy for handling rate limits.
By default, if a paginated function (i.e. a rtweet function that performs
multiple calls to the twitter API) is rate-limited it will return all results
received up to that point, along with a warning telling you how to get more
results. Alternatively, if you want to automatically wait until the
rate-limit is reset, you can setretryratelimit = TRUE
. -
The default value of
retryonratelimit
comes from the option
rtweet.retryonratelimit
so you can globally set it toTRUE
if desired
(#173). -
All functions that perform multiple requests on your behalf now display
a progress bar so you know what's happening. If you don't want it, you can
turn it off withverbose = FALSE
(#518). -
Banned or protected accounts now trigger a warning instead of an error,
but if data from other users is requested it is not served by the API and
returned as NA (#590, @simonheb). -
Added support for posting alt-text metadata with images tweeted with status
updated viapost_tweet()
. (#425, @hrbrmstr) -
stream_tweets()
has been overhauled to only write valid data. This obsoletes
all previous strategy to clean up bad data after the fact (#350, #356). -
The maintainer changed.
-
New
user_block()
anduser_unblock()
to block and unblock users (#593,
@simonheb). -
The new
tweet_threading
function is now faster and more reliable (#305,
#693, @charliejhadley). -
Fields
withheld_scope
,withheld_copyright
,withheld_in_countries
are
now correctly parsed (#647, @alexpghayes). -
Functions like
search_tweets()
,lookup_statuses()
and others return the
appropriate date time format for the right columns (created_at
mostly)
(#653, #657, #660, @alexpghayes, @Rickpat). -
Premium/sandbox environments are supported in
search_fullarchive()
and
search_30day()
(#578, #713). -
The vignette must be pre-computed before submission (#609, @maelle).
rtweet-v0.7.0
Change version number
rtweet-v0.6.9
udpate docs
rtweet: Collecting Twitter data
Development version of {rtweet}
rtweet-v0.6.7
rtweet CRAN release 2018-06-20
rtweet: Collecting Twitter Data (github v0.6.13)
Dev version 0.6.13 of rtweet.