forked from ixpantia/googleErrorReportingR
-
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.
- Loading branch information
Showing
1 changed file
with
19 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
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) | ||
} | ||
|