build_legacy_call.RdCreate an API call for legacy data
build_legacy_call( data_item, api_key, from_date = NULL, to_date = NULL, settlement_date = NULL, settlement_period = NULL, bm_unit_id = NULL, bm_unit_type = NULL, lead_party_name = NULL, ngc_bm_unit_name = NULL, from_cleared_date = NULL, to_cleared_date = NULL, is_two_day_window = NULL, from_datetime = NULL, to_datetime = NULL, from_settlement_date = NULL, to_settlement_date = NULL, period = NULL, fuel_type = NULL, balancing_service_volume = NULL, zone_identifier = NULL, start_time = NULL, end_time = NULL, trade_name = NULL, trade_type = NULL, api_version = "v1", service_type = "csv", ... )
| data_item | character string; the id of the legacy data |
|---|---|
| api_key | character string; api key retrieved from the Elexon portal |
| from_date | character string; from date (automatically cleaned by format_date) |
| to_date | character string; to date (automatically cleaned by format_date) |
| settlement_date | character string; settlement date (automatically cleaned by format_date) |
| settlement_period | character string; settlement period |
| bm_unit_id | character string; BM Unit ID |
| bm_unit_type | character string; BM Unit type |
| lead_party_name | character string; lead party name |
| ngc_bm_unit_name | character string; NGC BM Unit name |
| from_cleared_date | character string; from cleared date (automatically cleaned by format_date) |
| to_cleared_date | character string; to cleared dat (automatically cleaned by format_date) |
| is_two_day_window | character string; is two day window |
| from_datetime | character string; from datetime |
| to_datetime | character string; to datetime |
| from_settlement_date | character string; from settlement date (automatically cleaned by format_date) |
| to_settlement_date | character string; to settlement date (automatically cleaned by format_date) |
| period | character string; period |
| fuel_type | character string; fuel type |
| balancing_service_volume | character string; balancing service volume |
| zone_identifier | character string; zone identifier |
| start_time | character string; start time |
| end_time | character string; end time |
| trade_name | character string; trade name |
| trade_type | character string; trade type |
| api_version | character string; version of the api to use (currently on v1) |
| service_type | character string; file format (csv or xml) |
| ... | additional parameters that will be appended onto the query string |
list; list with entries url for the call, service_type and data_item
Other call-building functions:
build_b_call(),
build_call(),
build_remit_call()
build_legacy_call(data_item = "FUELINST", api_key = "12345", from_datetime = "14-12-201613:00:00", to_datetime = "14-12-201614:00:00")#> $url #> [1] "https://api.bmreports.com/BMRS/FUELINST/v1?APIKey=12345&FromDateTime=2016-12-14%252013%3A00%3A00&ToDateTime=2016-12-14%252014%3A00%3A00&ServiceType=csv" #> #> $service_type #> [1] "csv" #> #> $data_item #> [1] "FUELINST" #>build_legacy_call(data_item = "QAS", api_key = "12345", settlement_date = "01 Jun 2019", service_type = "xml")#> $url #> [1] "https://api.bmreports.com/BMRS/QAS/v1?APIKey=12345&SettlementDate=2019-06-01&ServiceType=xml" #> #> $service_type #> [1] "xml" #> #> $data_item #> [1] "QAS" #>