Skip to content

OekoFor/ecopiapi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ecopiapi

Lifecycle: experimental

The goal of ecopiapi is to Get, post, patch data from the ecop API.

Installation

You can install the development version of ecopiapi from GitHub with: You will need your Github PAT for authentication (privat repo).

# install.packages("devtools")
devtools::install_github("OekoFor/ecopiapi", auth_token = {GITHUB_PAT})

Install a specific version

devtools::install_github("OekoFor/ecopiapi@0.0.9", auth_token = {GITHUB_PAT})

Example

To interact with the API, you need a valid key. It is recommended to store it as an environmental variable in .Renviron in the root directory of th project. The envar must be named ECOPI_API_KEY.

library(ecopiapi)
get_detections_list(params = list("project_name" = "017_neeri", "datetime__month" = 3))
get_latest_detections()
get_latest_detections_by_project(project_name = "017_neeri")
get_latest_detections_by_recorder(recorder_name = "00000000d76d0bf9")
get_latest_detections_by_recordergroup(project_name = "053_sion", recordergroup_name = "lapwing")
get_recordings_list(params = list("project_name" = "017_neeri", "datetime__month" = 3))