ARawles / BMRSr

@@ -50,8 +50,7 @@
Loading
50 50
                          api_version = "v1",
51 51
                          ...) {
52 52
  service_type <- match.arg(service_type)
53 -
  base_url  <- "https://api.bmreports.com"
54 -
  the_url <- httr::modify_url(base_url,
53 +
  base_url  <- httr::modify_url("https://api.bmreports.com",
55 54
                              path= paste0("BMRS/", data_item,"/", api_version)
56 55
  )
57 56
@@ -77,7 +76,7 @@
Loading
77 76
  # return with list of complete url, service_type, data_item
78 77
79 78
  request  <- list()
80 -
  request$url  <- httr::modify_url(the_url, query=c(input_params, additional_params))
79 +
  request$url  <- httr::modify_url(base_url, query=c(input_params, additional_params))
81 80
  request$service_type  <- service_type
82 81
  request$data_item  <- data_item
83 82
@@ -118,7 +117,7 @@
Loading
118 117
                             unavailability_type =  NULL, active_flag = NULL, sequence_id = NULL, service_type = "xml", api_version = "v1", ...){
119 118
120 119
  check_data_item(data_item, "REMIT")
121 -
  url  <- httr::modify_url("https://api.bmreports.com",
120 +
  base_url  <- httr::modify_url("https://api.bmreports.com",
122 121
                           path= paste0("BMRS/", data_item,"/", api_version)
123 122
  )
124 123
@@ -146,7 +145,7 @@
Loading
146 145
  additional_params <- list(...)
147 146
148 147
  request <- list()
149 -
  request$url  <- httr::modify_url(the_url, query=c(input_params, additional_params))
148 +
  request$url  <- httr::modify_url(base_url, query=c(input_params, additional_params))
150 149
  request$service_type <- service_type
151 150
  request$data_item <- data_item
152 151
  return(request)
@@ -197,7 +196,7 @@
Loading
197 196
                              period = NULL, fuel_type = NULL, balancing_service_volume = NULL, zone_identifier = NULL, start_time = NULL, end_time = NULL,
198 197
                              trade_name = NULL, trade_type = NULL, api_version = "v1", service_type = "csv", ...){
199 198
  check_data_item(data_item, "Legacy")
200 -
  url  <- httr::modify_url("https://api.bmreports.com",
199 +
  base_url  <- httr::modify_url("https://api.bmreports.com",
201 200
                           path= paste0("BMRS/", data_item,"/", api_version)
202 201
  )
203 202
  input_params <- list()
@@ -230,7 +229,7 @@
Loading
230 229
  additional_params <- list(...)
231 230
232 231
  request <- list()
233 -
  request$url  <- httr::modify_url(the_url, query=c(input_params, additional_params))
232 +
  request$url  <- httr::modify_url(base_url, query=c(input_params, additional_params))
234 233
  request$service_type <- service_type
235 234
  request$data_item <- data_item
236 235
  return(request)
@@ -259,9 +258,10 @@
Loading
259 258
  allowed_params <- get_parameters(data_item)
260 259
  prov_params <- list(...)
261 260
  if (length(prov_params) > 0){
261 +
    warn_params <- c()
262 262
    for (i in seq_along(prov_params)){
263 263
      if (names(prov_params)[i] %!in% allowed_params){
264 -
        warn_params <- names(prov_params[i])
264 +
        warn_params <- c(warn_params, names(prov_params[i]))
265 265
      }
266 266
    }
267 267
    if (warn) {
Files Coverage
R 85.20%
Project Totals (6 files) 85.20%
1
comment: false
2

3

4
coverage:
5
  status:
6
    project:
7
      default:
8
        target: auto
9
        threshold: 1%
10
    patch:
11
      default:
12
        target: auto
13
        threshold: 1%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading