odataR_query: Retrieve OData (sub) table

Description Usage Arguments Examples

Description

odataR_query is a low level function used to retrieve OData data. The high level functions (as e.g. odataR_get_table) convert the user specification to one or more calls to odataR_query with the appropriate url and query .
odataR_query2 is similar to odataR_query. Actually odataR_query2 is called by odataR_query after the full url is created by concatenating the 'url' and 'query' part.
Normally these functions are not directly used by the occasional user.

Usage

1
2
3
4
5
6
7
8
9
odataR_query(
  odata_url,
  odata_query = NULL,
  debug = F,
  err_msg = NULL,
  response_only = F
)

odataR_query2(odata_url, debug = F, err_msg = NULL, response_only = F)

Arguments

odata_url

Character string with the requested url (and in case of odataR_query2 the attached query)

odata_query

Character string with the query to attach to the url (not used in case of odataR_query2)

debug

Boolean indicating if the odata_url and odata_query argument will be printed. Default FALSE

err_msg

Character string with message to display in case of error. Default NULL

response_only

Boolean indicating that the result of this function should be the response object for the OData call and not the unpacked table. Could be useful for debugging. Default FALSE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
odataR_get_cat(query='$count',debug=T) # is executed as 
odataR_query(
   odata_url="https://opendata.cbs.nl/ODataCatalog/Tables",
   odata_query ="$count",
   )                                   # is executed as 
odataR_query2(
   odata_url="https://opendata.cbs.nl/ODataCatalog/Tables/$count"
   )

## End(Not run)

HanOostdijk/odataR documentation built on May 14, 2020, 5:57 p.m.