# IotApi.DatasApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**classesDatasGet**](DatasApi.md#classesDatasGet) | **GET** /classes/Datas | 查询Datas数据
[**classesDatasIdDelete**](DatasApi.md#classesDatasIdDelete) | **DELETE** /classes/Datas/{id} | 通过ID删除Datas
[**classesDatasIdGet**](DatasApi.md#classesDatasIdGet) | **GET** /classes/Datas/{id} | 通过ID获取Datas
[**classesDatasIdPut**](DatasApi.md#classesDatasIdPut) | **PUT** /classes/Datas/{id} | 通过ID更新Datas
[**classesDatasPost**](DatasApi.md#classesDatasPost) | **POST** /classes/Datas | 新增Datas记录


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

查询Datas数据

参考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.DatasApi();

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.classesDatasGet(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="classesDatasIdDelete"></a>
# **classesDatasIdDelete**
> classesDatasIdDelete(id)

通过ID删除Datas

通过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.DatasApi();

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


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.classesDatasIdDelete(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="classesDatasIdGet"></a>
# **classesDatasIdGet**
> ComponentsschemasDatas classesDatasIdGet(id)

通过ID获取Datas

通过ID获取Datas

### 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.DatasApi();

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


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

### Parameters

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

### Return type

[**ComponentsschemasDatas**](ComponentsschemasDatas.md)

### Authorization

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

### HTTP request headers

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

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

通过ID更新Datas

通过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.DatasApi();

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

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


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

### Parameters

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

### Return type

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

### Authorization

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

### HTTP request headers

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

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

新增Datas记录

新增一条Datas记录

### 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.DatasApi();

var body = new IotApi.AddDatas(); // AddDatas | 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.classesDatasPost(body, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**AddDatas**](AddDatas.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

