Skip to content

Latest commit

 

History

History
185 lines (120 loc) · 4.75 KB

DevicesApi.md

File metadata and controls

185 lines (120 loc) · 4.75 KB

mosquito_alert.api.DevicesApi

Load the API package

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}/

create

Device create(deviceRequest)

Example

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');
}

Parameters

Name Type Description Notes
deviceRequest DeviceRequest

Return type

Device

Authorization

jwtAuth

HTTP request headers

  • 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]

partialUpdate

DeviceUpdate partialUpdate(deviceId, patchedDeviceUpdateRequest)

Example

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');
}

Parameters

Name Type Description Notes
deviceId String
patchedDeviceUpdateRequest PatchedDeviceUpdateRequest [optional]

Return type

DeviceUpdate

Authorization

jwtAuth

HTTP request headers

  • 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]

retrieve

Device retrieve(deviceId)

Example

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');
}

Parameters

Name Type Description Notes
deviceId String

Return type

Device

Authorization

jwtAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update

DeviceUpdate update(deviceId, deviceUpdateRequest)

Example

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');
}

Parameters

Name Type Description Notes
deviceId String
deviceUpdateRequest DeviceUpdateRequest

Return type

DeviceUpdate

Authorization

jwtAuth

HTTP request headers

  • 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]