From 6415b1f7ca09ab62b11f014d9f5e1a41b88bbb2b Mon Sep 17 00:00:00 2001 From: schochastics Date: Wed, 30 Nov 2022 18:18:53 +0100 Subject: [PATCH] prepare submission to CRAN --- DESCRIPTION | 2 +- NEWS.md | 7 ++++--- R/stream_statuses.R | 2 ++ R/utils.R | 2 +- README.Rmd | 2 -- README.md | 3 --- cran-comments.md | 13 ++++++------- man/parse_stream.Rd | 3 +++ man/stream_timeline.Rd | 3 +++ 9 files changed, 20 insertions(+), 17 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index c9ea2fd..4d5c115 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: rtoot Title: Collecting and Analyzing Mastodon Data -Version: 0.1.0.9000 +Version: 0.2.0 Authors@R: c(person("David", "Schoch", , "david@schochastics.net", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-2952-4812")), person("Chung-hong", "Chan", ,"chainsawtiney@gmail.com", role = c("aut"), comment = c(ORCID = "0000-0002-6232-7530")), diff --git a/NEWS.md b/NEWS.md index 4bb5227..e6e5b7a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,10 +1,11 @@ -# rtoot (development version) +# rtoot 0.2.0 * possible to set token via environment variable (#68) * paginating results (#70) -* adding ratelimit checking (#43) +* added ratelimit checking (#43) * added pkgdown site (#79) -* added streaming (#84) +* added streaming functions `stream_*` (#84) +* added more instance endpoints (#34) # rtoot 0.1.0 diff --git a/R/stream_statuses.R b/R/stream_statuses.R index 260e3a9..c619370 100644 --- a/R/stream_statuses.R +++ b/R/stream_statuses.R @@ -15,6 +15,7 @@ #' \item{stream_timeline_list}{stream the statuses of a list} #' } #' @export +#' @return does not return anything. Statuses are written to file #' @examples #' \dontrun{ #' # stream public timeline for 30 seconds @@ -112,6 +113,7 @@ stream_timeline_list <- function( #' @export #' @details The stream sometimes returns invalid lines of json. These are automatically skipped. Parsing can be slow if your json contains a large amount of statuses #' @seealso `stream_timeline_public()`, `stream_timeline_hashtag()`,`stream_timeline_list()` +#' @return a tibble of statuses #' @examples #' \dontrun{ #' stream_timeline_public(1,file_name = "stream.json") diff --git a/R/utils.R b/R/utils.R index 06204f5..27a66df 100644 --- a/R/utils.R +++ b/R/utils.R @@ -25,7 +25,7 @@ make_get_request <- function(token, path, params = list(), instance = NULL, anon config <- httr::add_headers(Authorization = paste('Bearer', token$bearer)) } else { url <- prepare_url(instance) - config = list() + config <- list() } request_results <- httr::GET(httr::modify_url(url, path = path), diff --git a/README.Rmd b/README.Rmd index 0542d0b..6ec86ea 100644 --- a/README.Rmd +++ b/README.Rmd @@ -43,8 +43,6 @@ You can install the development version of rtoot from GitHub: devtools::install_github("schochastics/rtoot") ``` -*(The current dev version has many more features than the current version on CRAN)* - ## Authenticate First you should set up your own credentials (see also `vignette("auth")`) diff --git a/README.md b/README.md index 07ec01c..d90f4ec 100644 --- a/README.md +++ b/README.md @@ -33,9 +33,6 @@ You can install the development version of rtoot from GitHub: devtools::install_github("schochastics/rtoot") ``` -*(The current dev version has many more features than the current -version on CRAN)* - ## Authenticate First you should set up your own credentials (see also diff --git a/cran-comments.md b/cran-comments.md index aee2579..459016d 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,15 +1,14 @@ -## Resubmission of Initial Submission +## Update from 0.1.0 to 0.2.0 + +This update includes new functions to live stream toots and pagination of results as well +as ratelimit checking -This is the Resubmission of the initial submission of the rtoot package. -This submission fixes the missing return values in two functions. *(dontrun examples are used to not make unnecessary API calls)* # Test environments -* ubuntu 20.04, R 4.2.1 +* ubuntu 20.04, R 4.2.2 * win-builder (devel and release) ## R CMD check results -0 errors | 0 warnings | 1 note - -* This is a new release. +0 errors | 0 warnings | 0 notes diff --git a/man/parse_stream.Rd b/man/parse_stream.Rd index 57e0804..15d09d8 100644 --- a/man/parse_stream.Rd +++ b/man/parse_stream.Rd @@ -9,6 +9,9 @@ parse_stream(path) \arguments{ \item{path}{Character, name of JSON file with data collected by any \link{stream_timeline} function.} } +\value{ +a tibble of statuses +} \description{ Converts Mastodon stream data (JSON file) into a parsed tibble. } diff --git a/man/stream_timeline.Rd b/man/stream_timeline.Rd index 21da24b..e0122b7 100644 --- a/man/stream_timeline.Rd +++ b/man/stream_timeline.Rd @@ -62,6 +62,9 @@ stream_timeline_list( \item{list_id}{character, id of list to stream} } +\value{ +does not return anything. Statuses are written to file +} \description{ Collect live streams of Mastodon data }