# IotApi.SessionApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**classesSessionGet**](SessionApi.md#classesSessionGet) | **GET** /classes/_Session | 查询_Session数据
[**classesSessionIdDelete**](SessionApi.md#classesSessionIdDelete) | **DELETE** /classes/_Session/{id} | 通过ID删除_Session
[**classesSessionIdGet**](SessionApi.md#classesSessionIdGet) | **GET** /classes/_Session/{id} | 通过ID获取_Session
[**classesSessionIdPut**](SessionApi.md#classesSessionIdPut) | **PUT** /classes/_Session/{id} | 通过ID更新_Session
[**classesSessionPost**](SessionApi.md#classesSessionPost) | **POST** /classes/_Session | 新增_Session记录


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

查询_Session数据

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

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

通过ID删除_Session

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

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


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

通过ID获取_Session

通过ID获取_Session

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

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


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

### Parameters

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

### Return type

[**ComponentsschemasSession**](ComponentsschemasSession.md)

### Authorization

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

### HTTP request headers

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

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

通过ID更新_Session

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

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

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


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

### Parameters

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

### Return type

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

### Authorization

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

### HTTP request headers

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

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

新增_Session记录

新增一条_Session记录

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

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

### Parameters

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

