ustfd_response_meta_object: Extract Metadata From Parsed API Response

View source: R/ustfd.R

ustfd_response_meta_objectR Documentation

Extract Metadata From Parsed API Response

Description

ustfd_response_meta_object() will return the meta object included in a successful API response. The meta object is a list with the following items:

  • count - the number of records in the response

  • labels - a named list of labels for each field

  • dataTypes - a named list describing the data type for each field

  • dataFormats - a named list describing the data format for each field

  • total-count - the total number of records matching the query

  • total-pages - the total number of pages of records matching the query

Usage

ustfd_response_meta_object(response)

Arguments

response

a parsed response returned by ustfd_json_response()

Value

a list

See Also

Other ustfd_low_level: ustfd_json_response(), ustfd_request(), ustfd_response_payload(), ustfd_url()

Examples

## Not run: 
library(ustfd)
query <- ustfd_query('v1/accounting/dts/dts_table_2', sort =c('-record_date'))
response <- ustfd_request(query)
payload_table <- ustfd_response_payload(response)
payload_meta <- ustfd_response_meta_object(response)

## End(Not run)

ustfd documentation built on May 29, 2024, 5:05 a.m.