get_retweets_of_user: Get retweets of user 'r lifecycle::badge("deprecated")

View source: R/deprecated_functions.R

get_retweets_of_userR Documentation

Get retweets of user 'r lifecycle::badge("deprecated")

Description

This function collects retweets of tweets by a user or set of users between specified date ranges. Tweet-level data is stored in a data/ path as a series of JSONs beginning "data_"; User-level data is stored as a series of JSONs beginning "users_". If a filename is supplied, this function will save the result as a RDS file, otherwise it will return the results as a dataframe.

Usage

get_retweets_of_user(
  users,
  start_tweets,
  end_tweets,
  bearer_token = get_bearer(),
  n = 100,
  file = NULL,
  data_path = NULL,
  bind_tweets = TRUE,
  verbose = TRUE,
  ...
)

Arguments

users

character vector, user handles from which to collect data

start_tweets

string, starting date

end_tweets

string, ending date

bearer_token

string, bearer token

n

integer, upper limit of tweets to be fetched

file

string, name of the resulting RDS file

data_path

string, if supplied, fetched data can be saved to the designated path as jsons

bind_tweets

If TRUE, tweets captured are bound into a data.frame for assignment

verbose

If FALSE, query progress messages are suppressed

...

arguments will be passed to build_query() function. See ?build_query() for further information.

Value

a data frame

Examples

## Not run: 
bearer_token <- "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
users <- c("cbarrie", "justin_ct_ho")
get_retweets_of_user(users, "2020-01-01T00:00:00Z", "2020-04-05T00:00:00Z",
                     bearer_token, data_path = "data/")

## End(Not run)

academictwitteR documentation built on March 18, 2022, 6:41 p.m.