import 'package:mosquito_alert/api.dart';
All URIs are relative to https://api.mosquitoalert.com/v1
Method | HTTP request | Description |
---|---|---|
create | POST /devices/ | |
partialUpdate | PATCH /devices/{device_id}/ | |
retrieve | GET /devices/{device_id}/ | |
update | PUT /devices/{device_id}/ |
Device create(deviceRequest)
import 'package:mosquito_alert/api.dart';
final api = MosquitoAlert().getDevicesApi();
final DeviceRequest deviceRequest = ; // DeviceRequest |
try {
final response = api.create(deviceRequest);
print(response);
} catch on DioException (e) {
print('Exception when calling DevicesApi->create: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
deviceRequest | DeviceRequest |
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceUpdate partialUpdate(deviceId, patchedDeviceUpdateRequest)
import 'package:mosquito_alert/api.dart';
final api = MosquitoAlert().getDevicesApi();
final String deviceId = deviceId_example; // String |
final PatchedDeviceUpdateRequest patchedDeviceUpdateRequest = ; // PatchedDeviceUpdateRequest |
try {
final response = api.partialUpdate(deviceId, patchedDeviceUpdateRequest);
print(response);
} catch on DioException (e) {
print('Exception when calling DevicesApi->partialUpdate: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
deviceId | String | ||
patchedDeviceUpdateRequest | PatchedDeviceUpdateRequest | [optional] |
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Device retrieve(deviceId)
import 'package:mosquito_alert/api.dart';
final api = MosquitoAlert().getDevicesApi();
final String deviceId = deviceId_example; // String |
try {
final response = api.retrieve(deviceId);
print(response);
} catch on DioException (e) {
print('Exception when calling DevicesApi->retrieve: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
deviceId | String |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeviceUpdate update(deviceId, deviceUpdateRequest)
import 'package:mosquito_alert/api.dart';
final api = MosquitoAlert().getDevicesApi();
final String deviceId = deviceId_example; // String |
final DeviceUpdateRequest deviceUpdateRequest = ; // DeviceUpdateRequest |
try {
final response = api.update(deviceId, deviceUpdateRequest);
print(response);
} catch on DioException (e) {
print('Exception when calling DevicesApi->update: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
deviceId | String | ||
deviceUpdateRequest | DeviceUpdateRequest |
- Content-Type: application/json, application/x-www-form-urlencoded, multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]