Commit 260ce198 authored by Jean-Marie Lepioufle's avatar Jean-Marie Lepioufle
Browse files

add possibility frostAPI is not working

parent 75c883a8
......@@ -9,6 +9,7 @@ Depends:
R (>= 3.2.3)
Imports:
utils,
dplyr,
httr,
rapiclient
Remotes: git::git@git.nilu.no:rextapi/rapiclient.git
......
......@@ -36,62 +36,91 @@ api_object <- function(...){
getRainfallIDF <- function(...) {
res <- operations$getRainfallIDF(...)
res <- httr::content(res)
if (res$status_code==200L) {
res <- httr::content(res)
} else res <- NULL
return(res)
}
getRainfallIDFSources <- function(...) {
res <- operations$getRainfallIDFSources(...)
res <- httr::content(res)
if (res$status_code==200L) {
res <- httr::content(res)
} else res <- NULL
return(res)
}
getRecordsgetClimateNormals <- function(...) {
res <- operations$getRecordsgetClimateNormals(...)
res <- httr::content(res)
if (res$status_code==200L) {
res <- httr::content(res)
} else res <- NULL
return(res)
}
getAvailable <- function(...) {
res <- operations$getAvailable(...)
res <- httr::content(res)
if (res$status_code==200L) {
res <- httr::content(res)
} else res <- NULL
return(res)
}
getLocations <- function(...) {
res <- operations$getLocations(...)
res <- httr::content(res)
if (res$status_code==200L) {
res <- httr::content(res)
} else res <- NULL
return(res)
}
timeSeries <- function(...) {
res <- operations$timeSeries(...)
res <- httr::content(res)
if (res$status_code==200L) {
res <- httr::content(res)
res <- dplyr::bind_rows(lapply(res$data,data.frame))
} else res <- NULL
return(res)
}
quality <- function(...) {
res <- operations$quality(...)
res <- httr::content(res)
if (res$status_code==200L) {
res <- httr::content(res)
} else res <- NULL
return(res)
}
availableQualityCodes <- function(...) {
res <- operations$availableQualityCodes(...)
res <- httr::content(res)
if (res$status_code==200L) {
res <- httr::content(res)
} else res <- NULL
return(res)
}
observations <- function(...) {
res <- operations$observations(...)
res <- httr::content(res)
if (res$status_code==200L) {
res <- httr::content(res)
res <- dplyr::bind_rows(lapply(res$data,data.frame))
} else res <- NULL
return(res)
}
getSources <- function(...) {
res <- operations$getSources(...)
res <- httr::content(res)
if (res$status_code==200L) {
res <- httr::content(res)
} else res <- NULL
return(res)
}
getElements <- function(...) {
res <- operations$getElements(...)
res <- httr::content(res)
if (res$status_code==200L) {
res <- httr::content(res)
} else res <- NULL
return(res)
}
getCodeTables <- function(...) {
res <- operations$getCodeTables(...)
res <- httr::content(res)
if (res$status_code==200L) {
res <- httr::content(res)
} else res <- NULL
return(res)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment