Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs ref #154 #155

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: rtoot
Title: Collecting and Analyzing Mastodon Data
Version: 0.3.4
Version: 0.3.4.9000
Authors@R:
c(person("David", "Schoch", , "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-2952-4812")),
person("Chung-hong", "Chan", ,"[email protected]", role = c("aut"), comment = c(ORCID = "0000-0002-6232-7530")),
Expand All @@ -12,7 +12,7 @@ URL: https://gesistsa.github.io/rtoot/, https://github.com/gesistsa/rtoot/
BugReports: https://github.com/gesistsa/rtoot/issues
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Depends:
R (>= 3.6)
Imports:
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# rtoot 0.3.4.9000

* fixed #153 by allowing POSIXct as `max_id`, `min_id` and `since_id` (#154) by @Kudusch

# rtoot 0.3.4

* added progress bar for long running queries (#141) by @chainsawriot
Expand Down
14 changes: 12 additions & 2 deletions R/accounts.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ search_accounts <- function(query, limit = 40, token = NULL, anonymous = FALSE,
#' @inheritParams get_status
#' @inheritParams post_toot
#' @inheritParams get_timeline_home
#' @inheritParams get_timeline_public
#' @inherit get_timeline_public details
#' @param exclude_reblogs logical, Whether to filter out boosts from the response.
#' @param hashtag character, filter for statuses using a specific hashtag.
#' @param retryonratelimit If TRUE, and a rate limit is exhausted, will wait until it refreshes. Most Mastodon rate limits refresh every 5 minutes. If FALSE, and the rate limit is exceeded, the function will terminate early with a warning; you'll still get back all results received up to that point.
Expand Down Expand Up @@ -78,8 +80,8 @@ get_account_statuses <- function(id, max_id, since_id, min_id, limit = 20L,

#' Get followers of a user
#' @inheritParams get_account_statuses
#' @param max_id character, Return results older than this id
#' @param since_id character, Return results newer than this id
#' @inheritParams get_timeline_public
#' @inherit get_timeline_public details
#' @param limit integer, maximum number of results to return. Defaults to 40.
#' @param retryonratelimit If TRUE, and a rate limit is exhausted, will wait until it refreshes. Most Mastodon rate limits refresh every 5 minutes. If FALSE, and the rate limit is exceeded, the function will terminate early with a warning; you'll still get back all results received up to that point.
#' @inheritParams auth_setup
Expand Down Expand Up @@ -109,6 +111,8 @@ get_account_followers <- function(id, max_id, since_id,
#' @inheritParams get_account_statuses
#' @inheritParams get_account_followers
#' @inheritParams auth_setup
#' @inheritParams get_timeline_public
#' @inherit get_timeline_public details
#' @inherit get_account_followers details
#' @return tibble or list of accounts a user follows
#' @examples
Expand Down Expand Up @@ -212,6 +216,8 @@ get_account_bookmarks <- function(max_id, since_id, min_id, limit = 40L,
#' @inheritParams get_account_statuses
#' @inheritParams get_account_followers
#' @inheritParams auth_setup
#' @inheritParams get_timeline_public
#' @inherit get_timeline_public details
#' @param min_id character, Return results younger than this id
#' @inherit get_account_followers details
#' @return tibble or list of favourited statuses
Expand All @@ -238,6 +244,8 @@ get_account_favourites <- function(max_id, min_id, limit = 40L,
#' @inheritParams get_account_statuses
#' @inheritParams get_account_followers
#' @inheritParams auth_setup
#' @inheritParams get_timeline_public
#' @inherit get_timeline_public details
#' @inherit get_account_followers details
#' @return tibble or list of blocked users
#' @examples
Expand All @@ -263,6 +271,8 @@ get_account_blocks <- function(max_id, since_id, limit = 40L,
#' @inheritParams get_account_statuses
#' @inheritParams get_account_followers
#' @inheritParams auth_setup
#' @inheritParams get_timeline_public
#' @inherit get_timeline_public details
#' @inherit get_account_followers details
#' @return tibble or list of muted users
#' @examples
Expand Down
12 changes: 9 additions & 3 deletions R/timelines_statuses.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,15 @@ get_poll <- function(id, instance = NULL, token = NULL, anonymous = FALSE, parse
#' @param local logical, Show only local statuses?
#' @param remote logical, Show only remote statuses?
#' @param only_media logical, Show only statuses with media attached?
#' @param max_id character, Return results older than this id
#' @param since_id character, Return results newer than this id
#' @param min_id character, Return results immediately newer than this id
#' @param max_id character or `POSIXct` (date time), Return results older than this id
#' @param since_id character or `POSIXct` (date time), Return results newer than this id
#' @param min_id character or `POSIXct` (date time), Return results immediately newer than this id
#' @param limit integer, Maximum number of results to return
#' @param retryonratelimit If TRUE, and a rate limit is exhausted, will wait until it refreshes. Most Mastodon rate limits refresh every 5 minutes. If FALSE, and the rate limit is exceeded, the function will terminate early with a warning; you'll still get back all results received up to that point.
#' @param verbose logical whether to display messages
#' @inheritParams post_toot
#' @inheritParams get_status
#' @details `max_id`, `since_id`, and `min_id` can either be character or `POSIXct` (date time). If it is `POSXIct`, it will be converted to the so-called snowflake ID.
#' @return statuses
#' @export
#' @examples
Expand Down Expand Up @@ -126,12 +127,16 @@ get_timeline_public <- function(local = FALSE, remote = FALSE, only_media = FALS
#' Query the instance for the timeline of a specific hashtag
#' @param hashtag character, Content of a #hashtag. The hash is optional
#' @inherit get_timeline_public
#' @inherit get_timeline_public details
#' @export
#' @examples
#' \dontrun{
#' get_timeline_hashtag(hashtag = "#ichbinhanna")
#' ## anonymously
#' get_timeline_hashtag(hashtag = "ichbinhanna", instance = "mastodon.social", anonymous = TRUE)
#' ## Search for toots by date
#' get_timeline_hashtag(hashtag = "ichbinhanna", instance = "mastodon.social", anonymous = TRUE,
#' max_id = as.POSIXct("2024-03-01"))
#' }
get_timeline_hashtag <- function(hashtag = "rstats", local = FALSE, only_media = FALSE,
max_id, since_id, min_id, limit = 20L, instance = NULL,
Expand All @@ -152,6 +157,7 @@ get_timeline_hashtag <- function(hashtag = "rstats", local = FALSE, only_media =
#' Query the instance for the timeline from either followed users or a specific list. These functions can only be called with a user token from [create_token()].
#' @param list_id character, Local ID of the list in the database.
#' @inherit get_timeline_public
#' @inherit get_timeline_public details
#' @export
#' @examples
#' \dontrun{
Expand Down
4 changes: 2 additions & 2 deletions man/get_account_blocks.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/get_account_bookmarks.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/get_account_favourites.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/get_account_followers.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/get_account_following.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/get_account_mutes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/get_account_statuses.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions man/get_timeline_hashtag.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions man/get_timeline_home.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions man/get_timeline_public.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/rtoot-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading