soql_limit {soql}R Documentation

Limit the number of results from a SODA response

Description

Adds a parameter to the SODA URL that limits how many responses the API will send back.

Usage

soql_limit(soql_list, limit)

Arguments

soql_list

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

limit

Number of records desired.

Value

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

References

Documentation on the SODA website

See Also

soql_offset

Examples

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

[Package soql version 0.1.1 Index]