Skip to content
This repository has been archived by the owner on Nov 10, 2024. It is now read-only.

Commit

Permalink
Fix some warnings/deprection messages
Browse files Browse the repository at this point in the history
  • Loading branch information
llrs committed Feb 13, 2024
1 parent d528f63 commit f222bef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion R/auth.R
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,9 @@ auth_path <- function(...) {
#' @export
#' @rdname rtweet_user
rtweet_oauth2 <- function(client = NULL, scopes = NULL) {
.Defunct(msg = "No longer needed, httr2 handles it automatically", package = "rtweet")
lifecycle::deprecate_stop("2.0.0", what = "rtweet_oatuh2()",
details = c("No longer needed, httr2 handles it automatically",
i = "Register your client with `client_as('my_client')` and make your requests"))
client <- client %||% client_get()
if (!is_client(client)) {
abort(c("Client not valid",
Expand Down
3 changes: 2 additions & 1 deletion R/http.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ TWIT_method <- function(method, token, api,
details = c("This function might work until your bot/app/user is blocked or fail randomly!",
"!" = "The API has been deprecated and the new API v2.2 requires subscriptions for most endpoints.",
i = "See updates of function and API: help('rtweet-deprecated', 'rtweet' )"
))
),
always = TRUE)
# need scipen to ensure large IDs are not displayed in scientific notation
# need ut8-encoding for the comma separated IDs
withr::local_options(scipen = 14, encoding = "UTF-8")
Expand Down
1 change: 0 additions & 1 deletion R/post-tweet.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ post_tweet <- function(status = "my first rtweet #rstats",
lifecycle::deprecate_warn("1.0.0", "post_tweet(destroy_id)", "post_destroy()")
return(post_destroy(destroy_id, token=token))
}
.Defunct("tweet_post", "rtweet", "Due to API changes use tweet_post()")

## if retweet
if (!is.null(retweet_id)) {
Expand Down

0 comments on commit f222bef

Please sign in to comment.