This repository has been archived by the owner on Nov 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
514 additions
and
1,273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Type: Package | ||
Package: rtweet | ||
Title: Collecting Twitter Data | ||
Version: 1.2.0.9005 | ||
Version: 1.2.1.9001 | ||
Authors@R: c( | ||
person("Michael W.", "Kearney", , "[email protected]", role = "aut", | ||
comment = c(ORCID = "0000-0002-0730-4694")), | ||
|
@@ -51,7 +51,7 @@ Suggests: | |
maps (>= 3.4.0), | ||
openssl (>= 2.0.2), | ||
rmarkdown (>= 2.14), | ||
spelling, | ||
spelling (>= 2.2.1), | ||
testthat (>= 3.1.0), | ||
vcr (>= 0.6.0), | ||
webshot (>= 0.5.3) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#' Remove tokens | ||
#' | ||
#' If there is a file with saved tokens it will delete it. | ||
#' | ||
#' This functions helps to comply with CRAN policy to remove files created by | ||
#' the package. | ||
#' @param old A logical value if you want to remove old tokens. | ||
#' @param new A logical value if you want to remove new tokens. | ||
#' | ||
#' @return An invisible logical value showing the success of the operation. | ||
#' If no tokens need to be deleted it will return FALSE too. | ||
#' `NULL` if there is nothing to do. | ||
#' @export | ||
#' @examples | ||
#' auth_clean(FALSE, FALSE) | ||
auth_clean <- function(old = TRUE, new = FALSE) { | ||
stopifnot(is_logical(old)) | ||
stopifnot(is_logical(new)) | ||
|
||
if (isFALSE(old) && isFALSE(new)) { | ||
inform(c("Nothing to do", | ||
i = "Did you meant to set `old = TRUE`?")) | ||
return(invisible(NULL)) | ||
} | ||
old_tokens <- find_old_tokens() | ||
tools_tokens <- find_tools_tokens() | ||
all_tokens_files <- c(old_tokens, tools_tokens) | ||
if (is.null(all_tokens_files)) { | ||
inform("No tokens were found! Nothing to do.") | ||
return(invisible(NULL)) | ||
} | ||
ot <- FALSE | ||
nt <- FALSE | ||
if (length(old_tokens) != 0 && old) { | ||
ot <- unlink(old_tokens) | ||
} | ||
if (length(tools_tokens) != 0 && new) { | ||
nt <- unlink(tools_tokens) | ||
} | ||
out <- old && ot || new && nt | ||
invisible(out) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.