get_data: Get Data

View source: R/get_data.R

get_dataR Documentation

Get Data

Description

Get data from an endpoint

Usage

get_data(query_url, query, pb = NULL, my_token)

Arguments

query_url

the query url which is passed to httr::POST()

query

the query to POST

pb

progress bar - default is NULL for no progress bar

my_token

the access token or function used to generate one

Details

This function accepts a query URL and extracts a tibble from the response. When a returnGeometry = "false" query was used previously get_geojson wouldn't parse the data correctly and would return an empty tibble A new function get_tibble has been added to use a different method for requesting and parsing data when the geometry isn't returned.

Value

either a tibble or sf object depending on return_geometry


MatthewJWhittle/getarc documentation built on April 22, 2023, 12:16 p.m.