martin_api 1.0.0 martin_api: ^1.0.0 copied to clipboard
Swagger API client
swagger #
Register ### Register siterwell account first #### Account management - api/1/register ## Login ### Call login api to get token from response, and set token on the page top YOUR_TOKEN field then press explore button #### Account management - api/1/login ## Response Structure ### The Envelope Every response is contained by an envelope. That is, each response has a predictable set of keys with which you can expect to interact: json { \"status\": \"success\", \"message\": \".....\", \"results\": { ... } }
## Controller and Device ### Caps(Capability), Props(Property), Status The device management API will send/receive controller/device capability and property to communicate with backend server, and all supported json values are list below http://web.siterwell.co.uk/api/apiDoc.html #
This Dart package is automatically generated by the Swagger Codegen project:
- API version: 1.20.1.7
- Build package: io.swagger.codegen.languages.DartClientCodegen
Requirements #
Dart 1.20.0 or later OR Flutter 0.0.20 or later
Installation & Usage #
Github #
If this Dart package is published to Github, please include the following in pubspec.yaml
name: swagger
version: 1.0.0
description: Swagger API client
dependencies:
swagger:
git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
version: 'any'
Local #
To use the package in your local drive, please include the following in pubspec.yaml
dependencies:
swagger:
path: /path/to/swagger
Tests #
TODO
Getting Started #
Please follow the installation procedure and then run the following:
import 'package:swagger/api.dart';
// TODO Configure API key authorization: Token
//swagger.api.Configuration.apiKey{'Bearer'} = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//swagger.api.Configuration.apiKeyPrefix{'Bearer'} = "Bearer";
var api_instance = new AccountManagementApi();
var type = type_example; // String | Upload file type
var file = /path/to/file.txt; // MultipartFile | file to upload
try {
var result = api_instance.apiFileUploadPOST(type, file);
print(result);
} catch (e) {
print("Exception when calling AccountManagementApi->apiFileUploadPOST: $e\n");
}
Documentation for API Endpoints #
All URIs are relative to https://api.siterwell.co.uk
Class | Method | HTTP request | Description |
---|---|---|---|
AccountManagementApi | apiFileUploadPOST | POST /api/1/users/file | upload file |
AccountManagementApi | apiForgotPasswordPOST | POST /api/1/forgotPassword/ | User forgot password |
AccountManagementApi | apiLoginPOST | POST /api/1/login/ | User login |
AccountManagementApi | apiLogoutPOST | POST /api/1/logout/ | User logout |
AccountManagementApi | apiRegisterPOST | POST /api/1/register/ | User signup |
AccountManagementApi | apiResendEmailPOST | POST /api/1/resendEmail/ | Resend verification email |
AccountManagementApi | apiResetPasswordPOST | POST /api/1/resetPassword/{tokenId} | Reset password |
AccountManagementApi | apiUserDataPOST | POST /api/1/userData/ | Update user data |
AccountManagementApi | apiUsersMeGET | GET /api/1/users/me/ | Get user data |
AccountManagementApi | apiVerifyEmailPOST | POST /api/1/verifyEmail/{tokenId} | Verify email address |
DeviceManagementApi | apiControllerCtrlPOST | POST /api/1/controllers/{controllerId}/ctrl/ | Control a controller |
DeviceManagementApi | apiControllerDELETE | DELETE /api/1/controllers | Delete a controller |
DeviceManagementApi | apiControllerGET | GET /api/1/controllers | Get controller info |
DeviceManagementApi | apiControllerPATCH | PATCH /api/1/controllers | Update a controller |
DeviceManagementApi | apiControllerPOST | POST /api/1/controllers | Add a controller |
DeviceManagementApi | apiControllerPUT | PUT /api/1/controllers | Put a controller |
DeviceManagementApi | apiDeviceChannelCtrlPOST | POST /api/1/controllers/{controllerId}/devices/{devId}/channels/{channelId}/ctrl/ | Control a channel of a specified device property |
DeviceManagementApi | apiDeviceCtrlPOST | POST /api/1/controllers/{controllerId}/devices/{devId}/ctrl/ | Control a device property |
DeviceManagementApi | apiDevicesDELETE | DELETE /api/1/controllers/{controllerId}/devices | Delete a controller's devices |
DeviceManagementApi | apiDevicesGet | GET /api/1/controllers/{controllerId}/devices | Get devices info |
DeviceManagementApi | apiDevicesPATCH | PATCH /api/1/controllers/{controllerId}/devices | Update a controller's devices |
DeviceManagementApi | apiDevicesPOST | POST /api/1/controllers/{controllerId}/devices | Add a controller's devices |
DeviceManagementApi | apiDevicesPUT | PUT /api/1/controllers/{controllerId}/devices | Put a controller's devices |
DeviceManagementApi | apiGetControllerTimezone | GET /api/1/controllers/{controllerId}/timezone | Get timezone info |
DeviceManagementApi | apiGetControllerWeather | GET /api/1/controllers/{controllerId}/weather | Get weather info |
EventHandleApi | apiAlert | POST /api/1/event/controllers/{controllerId}/alert | alert handle |
EventHandleApi | apiBatchHandlePOST | POST /api/1/event/controllers/{controllerId}/batchHandle | Batch handle event |
EventHandleApi | apiEventDefGET | GET /api/1/event/def/ | event trigger |
EventHandleApi | apiEventHandle | POST /api/1/event/handle | event trigger |
EventHandleApi | apiHandleFilePOST | POST /api/1/event/controllers/{controllerId}/devices/{devId}/file | Handle event with file |
FamilyAccountManagementApi | apiPrivilegeDELETE | DELETE /api/1/controllers/{controllerId}/privilege | Delete a family account |
FamilyAccountManagementApi | apiPrivilegePATCH | PATCH /api/1/controllers/{controllerId}/privilege | Update a family account |
FamilyAccountManagementApi | apiPrivilegePOST | POST /api/1/controllers/{controllerId}/privilege | Add a family account |
FamilyAccountManagementApi | apiPrivilegeResendMail | POST /api/1/controllers/{controllerId}/privilege/sendMail | resend invite mail |
FamilyAccountManagementApi | apiPrivilegesGet | GET /api/1/privileges/ | Get pre-defined family account privileges |
LogManagementApi | api1LogsGet | GET /api/1/logs | Get all controller logs by user |
LogManagementApi | apiControllerLogsGET | GET /api/1/controllers/{controllerId}/logs | Get a controller's logs |
LogManagementApi | apiDeviceLogsGET | GET /api/1/controllers/{controllerId}/devices/{devId}/logs | Get a device's logs |
LogManagementApi | apiSyncLogs | POST /api/1/logs/sync | sync logs |
LogManagementApi | apiSyncSnapshotPOST | POST /api/1/logs/controllers/{controllerId}/devices/{devId}/sync/snapshot/ | Sync logs with snapshot |
ReportManagementApi | apiBrandReportGET | GET /api/1/brands/{brandName}/reports | Get reports depends on brand name |
ReportManagementApi | apiBrandTypeReportGET | GET /api/1/brands/{brandName}/types/{typeEnum}/reports | Get reports depends on brand name and periodical type |
ReportManagementApi | apiReportGET | GET /api/1/reports | Get reports |
ReportManagementApi | apiReportSupportFieldsGET | GET /api/1/reports/supportFields | Get support fields of report |
RuleManagementApi | apiControllerRuleDELETE | DELETE /api/1/controllers/{controllerId}/rules | Delete a controller's rules |
RuleManagementApi | apiControllerRulePATCH | PATCH /api/1/controllers/{controllerId}/rules | Update a controller's rules |
RuleManagementApi | apiControllerRulePOST | POST /api/1/controllers/{controllerId}/rules | Add a controller's rules |
RuleManagementApi | apiControllerRuleTrigger | POST /api/1/controllers/{controllerId}/rules/{ruleId}/trigger | Trigger a controller's rule manually |
RuleManagementApi | apiControllerRulessGET | GET /api/1/controllers/{controllerId}/rules | Get a controller's rules |
RuleManagementApi | apiRulesGET | GET /api/1/rules/ | Get all rules of all controllers |
StreamingManagementApi | apiLiveViewGET | GET /api/1/controllers/{controllerId}/devices/{devId}/live/ | Request live view streaming from camera device |
StreamingManagementApi | apiPlaylistGET | GET /api/1/controllers/{controllerId}/devices/{devId}/playlist/ | Request playlist of recording from camera device |
StreamingManagementApi | apiSnapshotGET | GET /api/1/controllers/{controllerId}/devices/{devId}/snapshot/ | Request latest snapshot from camera device |
StreamingManagementApi | apiSnapshotPOST | POST /api/1/controllers/{controllerId}/devices/{devId}/snapshot/ | Upload latest snapshot of camera device |
StreamingManagementApi | apiStreamingRecordsGET | GET /api/1/controllers/{controllerId}/devices/{devId}/records/ | Retrive streaming records of camera in use |
UtilityApi | apiControllersFilePOST | POST /api/1/controllers/{controllerId}/files | upload file |
UtilityApi | apiGeoIpGet | GET /api/1/geoIp/ | Get geographic information from IP address |
UtilityApi | apiGeoIpPost | POST /api/1/geoIp/ | Add geographic information from mobile app |
UtilityApi | apiGetTimezone | GET /api/1/timezone | Get timezone info |
UtilityApi | apiGetVersion | GET /api/1/version/ | Get server related version info |
UtilityApi | apiGetWeather | GET /api/1/weather | Get weather info |
UtilityApi | apiUtilUploadFile | POST /api/1/upload/file | upload file |
Documentation For Models #
- ActionItem
- AlertRes
- CapsGroupItem
- ConditionItem
- ControllerCtrlReq
- ControllerCtrlReqParams
- ControllerItem
- ControllerItemRes
- CtrlItem
- DefinedEventItem
- DefinedEventTransItem
- DefinedEventsRes
- DefinedEventsResResults
- DefinedPrivilegesItem
- DefinedPrivilegesRes
- DefinedPrivilegesResResults
- DevChannelItem
- DevPropertyItem
- DeviceItem
- DeviceItemRes
- DndItem
- ErrorRes
- EventItem
- ForgotPasswordReq
- GeoItem
- GetControllersRes
- GetControllersResResults
- GetDevicesRes
- GetDevicesResResults
- GetGeoIpRes
- GetGeoIpResResults
- GetLogsRes
- GetRulesRes
- GetRulesResResults
- GetSnapshotRes
- GetStreamingRecordsRes
- GetUserRulesRes
- GetUserRulesResResults
- GetUsersRulesItem
- GetVersionRes
- GetVersionResResults
- GroupItem
- HwInfoItem
- InlineResponse200
- LogItem
- LogItemContent
- LoginReq
- MessageRes
- ModeItem
- OperDevItemRes
- OperDevicesRes
- OperDevicesResResults
- OperRuleItemRes
- OperRulesRes
- OperRulesResResults
- ParmItem
- ParmItemArray
- ParmItemArrayInner
- PlaceItem
- PostSnapshotRes
- PrivilegeItem
- PrivilegeItemIn
- PrivilegeItemPrivGroup
- PropertyItem
- RegisterReq
- ReportItem
- ReportRes
- ReportSupportFieldsRes
- ResetPasswordReq
- RuleIdList
- RuleIdListInner
- RuleItem
- Rules
- SimplyEventItem
- SnapshotItem
- StatusItem
- StreamingRecordItem
- StreamingUrlRes
- SuccessRes
- TimezoneRes
- TimezoneResResults
- UserDataItem
- UserDataReq
- UserItem
- UserMeRes
- WeatherItem
- WeatherItemMain
- WeatherItemMainTemp
- WeatherItemWeather
- WeatherRes
- WeatherResErrors
Documentation For Authorization #
Token #
- Type: API key
- API key parameter name: Bearer
- Location: HTTP header