Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
FvD committed Jun 18, 2022
1 parent f8a660d commit 875d7db
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions R/list_errors.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#' Get list of errors from Google Error Reporting
#'
#' @param project_id the project ID of your project on GCP
#' @param api_key an API key with permissions to write to Google Error Reporting
#' @param message the error report to be written out to the
#'
#' @return No return, we focus on side effect
list_errors <- function(project_id,
api_key) {

base_url <- "https://clouderrorreporting.googleapis.com/v1beta1/"
project_name <- paste0("projects/", project_id)
endpoint <- "/events?key="

url <- paste0(base_url, project_name, endpoint, api_key)

httr::GET(url)
}

0 comments on commit 875d7db

Please sign in to comment.