parse_request: Parse the request from the reddit API

Description Usage Arguments Value

View source: R/utils.R

Description

The function parses the JSON object of the request of the reddit API and turns it into a dataframe or vector if so desired.

Usage

1
parse_request(request, verbose, output, after_before = TRUE)

Arguments

request

The request made to the reddit API

verbose

Boolean. A logical flag whether information about the data extraction should be printed to the console.

output

What the function should return. Choose json for an unparsed json object, df for a parsed object in form of a dataframe, and all for a list containg the json object, a dataframe, and the before and after anchors.

after_before

Boolean. A logical flag whether output = "all" should return the before and after anchors.

Value

A dataframe or vector.


jfeldhege/redditoR documentation built on April 2, 2020, 9:42 p.m.