soql_offset {soql}R Documentation

Control which records you receive from a SODA API

Description

This function adds a parameter to a soql object that controls what index the returned records start at. For more information, view the SODA documentation linked in the References section below.

Usage

soql_offset(soql_list, offset)

Arguments

soql_list

The soql object. If you don't have one yet, use the soql() function first. This can be piped in.

offset

Desired starting index of responses.

Value

Returns a new soql object, with an offset parameter added, for use in other functions.

References

Documentation on the SODA website

See Also

soql_limit

Examples

if (require(magrittr)) {
  # With pipes
  my_url <- soql() %>%
    soql_offset(50) %>%
    as.character()
} else {
  # Without pipes
  soql_chain <- soql()
  soql_chain <- soql_offset(soql_chain, 50)
  my_url <- as.character(soql_chain)
}

[Package soql version 0.1.1 Index]