build_b_call: Create an API call for B-data flows

Description Usage Arguments Value See Also Examples

View source: R/build.R

Description

Create an API call for B-data flows

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
build_b_call(
  data_item,
  api_key,
  settlement_date = NULL,
  period = NULL,
  year = NULL,
  month = NULL,
  week = NULL,
  process_type = NULL,
  start_time = NULL,
  end_time = NULL,
  start_date = NULL,
  end_date = NULL,
  service_type = c("csv", "xml"),
  api_version = "v1",
  ...
)

Arguments

data_item

character string; the id of the B flow

api_key

character string; api key retrieved from the Elexon portal

settlement_date

character string; settlement date (automatically cleaned by format_date)

period

character string; settlement period

year

character string; year

month

character string; month

week

character string; week

process_type

character string; process type

start_time

character string; start time

end_time

character string; end time

start_date

character string; start date

end_date

character string; end date

service_type

character string; file format (csv or xml)

api_version

character string; version of the api to use (currently on v1)

...

additional parameters that will be appended onto the query string

Value

list; list with entries url for the call, service_type and data_item

See Also

Other call-building functions: build_call(), build_legacy_call(), build_remit_call()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
    build_b_call(data_item = "B1730",
    api_key = "12345", settlement_date = "14-12-2016")

    build_b_call(data_item = "B1510",
    api_key = "12345", start_date = "01 Jan 2019",
    start_time = "00:00:00", end_date = "02 Jan 2019",
    end_time = "24:00:00", service_type = "csv")

## End(Not run)

BMRSr documentation built on June 14, 2021, 5:09 p.m.