Full Request

Perform a full API request (build, send, parse and clean)

full_request()

Create an API call, send the request and retrieve the results, and parse them

Build

Functions for building API calls.

build_b_call()

Create an API call for B-data flows

build_call()

Build an API call (uses the appropriate function based on the data item)

build_legacy_call()

Create an API call for legacy data

build_remit_call()

Create an API call for REMIT flows

Send

Functions for sending API requests.

send_request()

Send an API request (basically a wrapper to httr:GET that adds a marker for the data item)

Parse

Functions to parse API responses

parse_response()

Parse the results of a call

Utility

Utility functions.

clean_date_columns()

Reformat date, time, and datetime columns

check_data_item()

Check the data item to ensure that it is a valid request

generation_dataset_example

An example dataset from BMRS showing generation by fuel type.

get_column_names()

Get the column names for a returned CSV Legacy dataset

get_data_items()

Get a vector containing all of the permissible data items

get_data_item_type()

Get the data item type of a data item

get_function()

Get the correct function to create the API call depending on the data item

get_parameters()

Get the required parameters for a data item