replace_if_missing: Helper used when putting together the query parameters

Description Usage Arguments Details Value

View source: R/utils.R

Description

Set up default values if not specified by the user

Usage

1
replace_if_missing(params, field_and_defaults)

Arguments

params

list of the parameters that will go into the API request

field_and_defaults

list of import params with default values

Details

Even if these parameters were omitted it wouldn't change the result, but it's important to have their value be set explicitly so that other parts of the package can know what they are.

Value

modified params with the defaults fields / values added if they weren't present


dashstander/pushshiftr documentation built on Feb. 18, 2020, 2:42 a.m.