PaginateData: Paginate PushShift Data

Description Usage Arguments Examples

View source: R/pawr.R

Description

Send multiple queries to pushshift.io, to be able to get all data within a given date range.

Usage

1
2
3
4
5
6
7
8
PaginateData(
  type = c("comment", "submission", "subreddit"),
  verbose = getOption("PAWR.VerbosePaginate"),
  before = round(as.numeric(Sys.time())),
  after = NULL,
  timescope = NULL,
  ...
)

Arguments

type

Type of requested content. Can be comment, submission, or subreddit.

verbose

Should output be verbose? Defaults to a global option which can be set with options(PAWR.VerbosePaginate=TRUE/FALSE).

before

Upper limit in the date range of posts to be fetched.

after

Lower limit in the date range of posts to be fetched.

timescope

Time range, in seconds, within which posts should be fetched; works in conjunction with either before or after. When argument after is used, timescope causes the current function to fetch data that was created up to N seconds after the timestamp defined in after When argument before is used, timescope causes the current function to fetch data that was created up to N seconds before the timestamp defined in before

...

Other valid parameters. Run PSParams() to see all valid parameters and their descriptions.

Examples

1
2
#Get all comments from today containing the word "chocolate"
PaginateData(timescope=24 * 60 * 60,q="chocolate")

Spiritspeak/PAWR documentation built on March 21, 2021, 4:14 p.m.