Skip to content

Mosquito-Alert/mosquito-alert-R-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R API client for MosquitoAlert

Introducing API v1 for Mosquito Alert platform, a project desgined to facilitate citizen science initiatives and enable collaboration among scientists, public health officials, and environmental managers in the investigation and control of disease-carrying mosquitoes.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI spec from a remote server, you can easily generate an API client.

  • API version: v1
  • Package version: 0.1.2
  • Generator version: 7.12.0
  • Build package: org.openapitools.codegen.languages.RClientCodegen

Installation

Prerequisites

Install the dependencies

install.packages("jsonlite")
install.packages("httr")
install.packages("base64enc")

Build the package

git clone https://github.com/Mosquito-Alert/mosquito-alert-R-sdk
cd mosquito-alert-R-sdk
R CMD build .
R CMD check MosquitoAlert_0.1.2.tar.gz --no-manual
R CMD INSTALL --preclean MosquitoAlert_0.1.2.tar.gz

Install the package

install.packages("MosquitoAlert")

To install directly from Github, use devtools:

install.packages("devtools")
library(devtools)
install_github("Mosquito-Alert/mosquito-alert-R-sdk")

To install the package from a local file:

install.packages("MosquitoAlert_0.1.2.tar.gz", repos = NULL, type = "source")

Usage

library(MosquitoAlert)

Reformat code

To reformat code using styler, please run the following in the R console:

install.packages("remotes")
remotes::install_github("r-lib/[email protected]")
library("styler")
style_dir()

Documentation for API Endpoints

All URIs are relative to https://api.mosquitoalert.com/v1

Class Method HTTP request Description
AuthApi change_password POST /auth/password/change/
AuthApi obtain_token POST /auth/token/
AuthApi refresh_token POST /auth/token/refresh/
AuthApi signup_guest POST /auth/signup/guest/
AuthApi verify_token POST /auth/token/verify/
BitesApi create POST /bites/
BitesApi destroy DELETE /bites/{uuid}/
BitesApi list GET /bites/
BitesApi list_mine GET /me/bites/
BitesApi retrieve GET /bites/{uuid}/
BreedingSitesApi create POST /breeding-sites/
BreedingSitesApi destroy DELETE /breeding-sites/{uuid}/
BreedingSitesApi list GET /breeding-sites/
BreedingSitesApi list_mine GET /me/breeding-sites/
BreedingSitesApi retrieve GET /breeding-sites/{uuid}/
CampaignsApi list GET /campaigns/
CampaignsApi retrieve GET /campaigns/{id}/
CountriesApi retrieve GET /countries/{id}/
DevicesApi create POST /devices/
DevicesApi partial_update PATCH /devices/{device_id}/
DevicesApi retrieve GET /devices/{device_id}/
DevicesApi update PUT /devices/{device_id}/
FixesApi create POST /fixes/
NotificationsApi create POST /notifications/
NotificationsApi list GET /notifications/
NotificationsApi list_mine GET /me/notifications/
NotificationsApi partial_update PATCH /notifications/{id}/
NotificationsApi retrieve GET /notifications/{id}/
NotificationsApi update PUT /notifications/{id}/
ObservationsApi create POST /observations/
ObservationsApi destroy DELETE /observations/{uuid}/
ObservationsApi list GET /observations/
ObservationsApi list_mine GET /me/observations/
ObservationsApi prediction_create POST /observations/{uuid}/prediction/
ObservationsApi prediction_destroy DELETE /observations/{uuid}/prediction/
ObservationsApi prediction_retrieve GET /observations/{uuid}/prediction/
ObservationsApi retrieve GET /observations/{uuid}/
PartnersApi list GET /partners/
PartnersApi retrieve GET /partners/{id}/
PhotosApi prediction_create POST /photos/{uuid}/prediction/
PhotosApi prediction_destroy DELETE /photos/{uuid}/prediction/
PhotosApi prediction_retrieve GET /photos/{uuid}/prediction/
PhotosApi retrieve GET /photos/{uuid}/
UsersApi partial_update PATCH /users/{uuid}/
UsersApi retrieve GET /users/{uuid}/
UsersApi retrieve_mine GET /me/
UsersApi update PUT /users/{uuid}/

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

cookieAuth

  • Type: API key
  • API key parameter name: sessionid
  • Location:

jwtAuth

  • Type: Bearer authentication
  • Bearer Format: JWT

tokenAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

[email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages