# IotApi.DevicesApi

All URIs are relative to *http://localhost/iotapi/*

Method | HTTP request | Description
------------- | ------------- | -------------
[**classesDevicesGet**](DevicesApi.md#classesDevicesGet) | **GET** /classes/Devices | 查询Devices数据
[**classesDevicesIdDelete**](DevicesApi.md#classesDevicesIdDelete) | **DELETE** /classes/Devices/{id} | 通过ID删除Devices
[**classesDevicesIdGet**](DevicesApi.md#classesDevicesIdGet) | **GET** /classes/Devices/{id} | 通过ID获取Devices
[**classesDevicesIdPut**](DevicesApi.md#classesDevicesIdPut) | **PUT** /classes/Devices/{id} | 通过ID更新Devices
[**classesDevicesPost**](DevicesApi.md#classesDevicesPost) | **POST** /classes/Devices | 新增Devices记录


<a name="classesDevicesGet"></a>
# **classesDevicesGet**
> Componentsschemasresults classesDevicesGet(opts)

查询Devices数据

参考parse文档 https://docs.parseplatform.org/rest/guide/#queries,&lt;br/&gt;where支持：[$lt,$lte,$gt,$gte,$ne,$in,$nin,$exists,$select,$dontSelect,$all,$regex,$text]

### Example
```javascript
var IotApi = require('iot_api');
var defaultClient = IotApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix = 'Token';

var apiInstance = new IotApi.DevicesApi();

var opts = { 
  'order': "order_example", // String | 排序方式, 负为降序, eg: score,-name
  'limit': 8.14, // Number | limit, 显示多少条记录，显示100条记录 eg:100
  'skip': 8.14, // Number | skip
  'keys': "keys_example", // String | 需要显示的字段, eg: username,email
  'include': "include_example", // String | include
  'where': "where_example" // String | 过滤条件，eg: {\"objectId\":{\"$in\":[\"BGS3BFgcZN\"]}}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.classesDevicesGet(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **order** | **String**| 排序方式, 负为降序, eg: score,-name | [optional] 
 **limit** | **Number**| limit, 显示多少条记录，显示100条记录 eg:100 | [optional] 
 **skip** | **Number**| skip | [optional] 
 **keys** | **String**| 需要显示的字段, eg: username,email | [optional] 
 **include** | **String**| include | [optional] 
 **where** | **String**| 过滤条件，eg: {\&quot;objectId\&quot;:{\&quot;$in\&quot;:[\&quot;BGS3BFgcZN\&quot;]}} | [optional] 

### Return type

[**Componentsschemasresults**](Componentsschemasresults.md)

### Authorization

[APIKeyHeader](../README.md#APIKeyHeader)

### HTTP request headers

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

<a name="classesDevicesIdDelete"></a>
# **classesDevicesIdDelete**
> classesDevicesIdDelete(id)

通过ID删除Devices

通过ID删除数据

### Example
```javascript
var IotApi = require('iot_api');
var defaultClient = IotApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix = 'Token';

var apiInstance = new IotApi.DevicesApi();

var id = "id_example"; // String | 删除记录的ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.classesDevicesIdDelete(id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| 删除记录的ID | 

### Return type

null (empty response body)

### Authorization

[APIKeyHeader](../README.md#APIKeyHeader)

### HTTP request headers

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

<a name="classesDevicesIdGet"></a>
# **classesDevicesIdGet**
> ComponentsschemasDevices classesDevicesIdGet(id)

通过ID获取Devices

通过ID获取Devices

### Example
```javascript
var IotApi = require('iot_api');
var defaultClient = IotApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix = 'Token';

var apiInstance = new IotApi.DevicesApi();

var id = "id_example"; // String | 通过ID获取Devices


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.classesDevicesIdGet(id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| 通过ID获取Devices | 

### Return type

[**ComponentsschemasDevices**](ComponentsschemasDevices.md)

### Authorization

[APIKeyHeader](../README.md#APIKeyHeader)

### HTTP request headers

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

<a name="classesDevicesIdPut"></a>
# **classesDevicesIdPut**
> Componentsschemasupdatesuccess classesDevicesIdPut(id, body)

通过ID更新Devices

通过ID更新记录

### Example
```javascript
var IotApi = require('iot_api');
var defaultClient = IotApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix = 'Token';

var apiInstance = new IotApi.DevicesApi();

var id = "id_example"; // String | 更新记录的ID

var body = new IotApi.AddDevices(); // AddDevices | 数据更新的内容.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.classesDevicesIdPut(id, body, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| 更新记录的ID | 
 **body** | [**AddDevices**](AddDevices.md)| 数据更新的内容. | 

### Return type

[**Componentsschemasupdatesuccess**](Componentsschemasupdatesuccess.md)

### Authorization

[APIKeyHeader](../README.md#APIKeyHeader)

### HTTP request headers

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

<a name="classesDevicesPost"></a>
# **classesDevicesPost**
> Componentsschemascreatesuccess classesDevicesPost(body)

新增Devices记录

新增一条Devices记录

### Example
```javascript
var IotApi = require('iot_api');
var defaultClient = IotApi.ApiClient.instance;

// Configure API key authorization: APIKeyHeader
var APIKeyHeader = defaultClient.authentications['APIKeyHeader'];
APIKeyHeader.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyHeader.apiKeyPrefix = 'Token';

var apiInstance = new IotApi.DevicesApi();

var body = new IotApi.AddDevices(); // AddDevices | object that needs to be added to the store


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.classesDevicesPost(body, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**AddDevices**](AddDevices.md)| object that needs to be added to the store | 

### Return type

[**Componentsschemascreatesuccess**](Componentsschemascreatesuccess.md)

### Authorization

[APIKeyHeader](../README.md#APIKeyHeader)

### HTTP request headers

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

