-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from IDEMSInternational/add_definitions_to_buc…
…ket_ Add definitions data back to the bucket
- Loading branch information
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#' Add New Definitions to Google Cloud Storage Bucket | ||
#' | ||
#' This function adds a new definitions file with a timestamp to a specified Google Cloud Storage (GCS) bucket. The new definitions are sourced from a JSON file provided as input. | ||
#' | ||
#' @param country A character vector specifying the country or countries from which to get the definitions data. Options are `"mz"` and `"zm"`. | ||
#' @param station_id A character string specifying the ID of the station for which to get the definitions data. | ||
#' @param new_definitions A character vector specifying the path to the JSON file containing the new definitions. | ||
#' | ||
#' @export | ||
#' @details | ||
#' The function creates a timestamp in the format "YYYYMMDDHHMMSS" and appends it to the station_id to form the filename. It then reads the provided JSON file, creates a new JSON file with the timestamped filename, and uploads it to the specified GCS bucket. | ||
add_definitions_to_bucket <- function(country, station_id, new_definitions){ | ||
return(epicsadata::add_definitions_to_bucket(country = country, station_id = station_id, new_definitions = new_definitions)) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.