From 17d5c509a72828ae28ad5403486a6d47b54e5c87 Mon Sep 17 00:00:00 2001 From: machmaleinheelflip Date: Tue, 17 Sep 2024 11:01:53 +0200 Subject: [PATCH] get_detections_retrieve() added --- R/api.R | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/R/api.R b/R/api.R index 88235c3..a599548 100644 --- a/R/api.R +++ b/R/api.R @@ -100,6 +100,28 @@ get_detections <- function(...) { +#' Get detections retrieve. +#' +#' Wrapper around the 'Retrieve Detections' endpoint to retrieve a single detection based on uid +#' +#' @param ... query paramaters. See \url(https://api.ecopi.de/api/docs/#tag/v0.1/operation/v0.1_detections_retrieve) +#' +#' @examples +#' # Retrieve a single detection for a specific uid +#' get_detections_retrieve(uid="64733fbc-7cc8-49f6-adf1-c9ec2d676959") +#' +#' @return A list containing the detection that match the specified query parameters: \url(https://api.ecopi.de/api/v0.1/docsco/#operation/detections_list) +#' +#' @export +get_detections_retrieve <- function(..., id_or_uid) { + # params <- list(...) + ecopi_api("GET /detections/{id_or_uid}/", id_or_uid = id_or_uid) |> + resp_body_json_to_df() +} + + + + #' PATCH detection #' #' Wrapper around the 'ListView Detections' endpoint to update detections parameters based on the specified query parameters.