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.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: v1
- Package version: 1.0.0
- Generator version: 7.10.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Python 3.7+
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/Mosquito-Alert/mosquito-alert-python-sdk.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/Mosquito-Alert/mosquito-alert-python-sdk.git
)
Then import the package:
import mosquito_alert
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import mosquito_alert
Execute pytest
to run the tests.
Please follow the installation procedure and then run the following:
import mosquito_alert
from mosquito_alert.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.mosquitoalert.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = mosquito_alert.Configuration(
host = "https://api.mosquitoalert.com/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: cookieAuth
configuration.api_key['cookieAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookieAuth'] = 'Bearer'
# Configure API key authorization: tokenAuth
configuration.api_key['tokenAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['tokenAuth'] = 'Bearer'
# Configure Bearer authorization (JWT): jwtAuth
configuration = mosquito_alert.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with mosquito_alert.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = mosquito_alert.BitesApi(api_client)
bite_request = mosquito_alert.BiteRequest() # BiteRequest |
try:
api_response = api_instance.bites_create(bite_request)
print("The response of BitesApi->bites_create:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling BitesApi->bites_create: %s\n" % e)
All URIs are relative to https://api.mosquitoalert.com/v1
Class | Method | HTTP request | Description |
---|---|---|---|
BitesApi | bites_create | POST /bites/ | |
BitesApi | bites_destroy | DELETE /bites/{uuid}/ | |
BitesApi | bites_list | GET /bites/ | |
BitesApi | bites_retrieve | GET /bites/{uuid}/ | |
BreedingSitesApi | breeding_sites_create | POST /breeding-sites/ | |
BreedingSitesApi | breeding_sites_destroy | DELETE /breeding-sites/{uuid}/ | |
BreedingSitesApi | breeding_sites_list | GET /breeding-sites/ | |
BreedingSitesApi | breeding_sites_retrieve | GET /breeding-sites/{uuid}/ | |
CampaignsApi | campaigns_list | GET /campaigns/ | |
CampaignsApi | campaigns_retrieve | GET /campaigns/{id}/ | |
CountriesApi | countries_retrieve | GET /countries/{id}/ | |
FixesApi | fixes_create | POST /fixes/ | |
NotificationsApi | notifications_create | POST /notifications/ | |
NotificationsApi | notifications_list | GET /notifications/ | |
NotificationsApi | notifications_partial_update | PATCH /notifications/{id}/ | |
NotificationsApi | notifications_retrieve | GET /notifications/{id}/ | |
NotificationsApi | notifications_update | PUT /notifications/{id}/ | |
ObservationsApi | observations_create | POST /observations/ | |
ObservationsApi | observations_destroy | DELETE /observations/{uuid}/ | |
ObservationsApi | observations_list | GET /observations/ | |
ObservationsApi | observations_prediction_create | POST /observations/{uuid}/prediction/ | |
ObservationsApi | observations_prediction_destroy | DELETE /observations/{uuid}/prediction/ | |
ObservationsApi | observations_prediction_retrieve | GET /observations/{uuid}/prediction/ | |
ObservationsApi | observations_retrieve | GET /observations/{uuid}/ | |
PartnersApi | partners_list | GET /partners/ | |
PartnersApi | partners_retrieve | GET /partners/{id}/ | |
PhotosApi | photos_prediction_create | POST /photos/{uuid}/prediction/ | |
PhotosApi | photos_prediction_destroy | DELETE /photos/{uuid}/prediction/ | |
PhotosApi | photos_prediction_retrieve | GET /photos/{uuid}/prediction/ | |
PhotosApi | photos_retrieve | GET /photos/{uuid}/ | |
TokenApi | token_create | POST /token/ | |
TokenApi | token_refresh_create | POST /token/refresh/ | |
UsersApi | users_create | POST /users/ | |
UsersApi | users_partial_update | PATCH /users/{uuid}/ | |
UsersApi | users_retrieve | GET /users/{uuid}/ | |
UsersApi | users_update | PUT /users/{uuid}/ |
- AppUserTokenObtainPair
- AppUserTokenObtainPairRequest
- Bite
- BiteRequest
- BoundingBox
- BoundingBoxRequest
- BreedingSite
- BreedingSiteRequest
- Campaign
- Country
- CreateNotification
- CreateUser
- CreateUserRequest
- Device
- DeviceRequest
- Fix
- FixLocation
- FixLocationRequest
- FixRequest
- Location
- LocationPoint
- LocationRequest
- MetaNotificationRequest
- Notification
- NotificationRequest
- Observation
- ObservationPrediction
- ObservationPredictionRequest
- ObservationRequest
- Package
- PackageRequest
- PaginatedBiteList
- PaginatedBreedingSiteList
- PaginatedCampaignList
- PaginatedNotificationList
- PaginatedObservationList
- PaginatedPartnerList
- Partner
- PartnerPoint
- PatchedNotificationRequest
- PatchedUserRequest
- Photo
- PhotoPrediction
- PhotoPredictionRequest
- PredictionScore
- PredictionScoreRequest
- SimplePhoto
- SimplePhotoRequest
- TokenRefresh
- TokenRefreshRequest
- TopicNotificationCreateRequest
- User
- UserNotificationCreateRequest
- UserRequest
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: sessionid
- Location:
- Type: Bearer authentication (JWT)
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header