Create an API call for B-data flows

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 = "csv", 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)

Value

list; created url for the call, service type and data item

See also

Other call-building functions: build_call, build_legacy_call, build_remit_call

Examples

build_b_call(data_item = "B1730", api_key = "12345", settlement_date = "14-12-2016")
#> $url #> [1] "https://api.bmreports.com/BMRS/B1730/v1?APIKey=12345&SettlementDate=2016-12-14&ServiceType=csv" #> #> $service_type #> [1] "csv" #> #> $data_item #> [1] "B1730" #>
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")
#> $url #> [1] "https://api.bmreports.com/BMRS/B1510/v1?APIKey=12345&StartDate=2019-01-01&EndDate=2019-01-02&StartTime=00:00:00&EndTime=00:00:00&ServiceType=csv" #> #> $service_type #> [1] "csv" #> #> $data_item #> [1] "B1510" #>