artikcloud 2.0.5 → 2.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +23 -1
- data/LICENSE +1 -2
- data/README.md +50 -4
- data/artikcloud.gemspec +29 -5
- data/docs/DeviceTask.md +13 -0
- data/docs/DeviceTaskUpdateRequest.md +8 -0
- data/docs/DeviceTaskUpdateResponse.md +8 -0
- data/docs/DeviceTypeInfo.md +14 -0
- data/docs/DeviceTypeInfoEnvelope.md +8 -0
- data/docs/DeviceTypesApi.md +61 -0
- data/docs/DeviceTypesInfo.md +14 -0
- data/docs/DeviceTypesInfoEnvelope.md +8 -0
- data/docs/DevicesManagementApi.md +870 -0
- data/docs/EventFeedData.md +10 -0
- data/docs/MetadataEnvelope.md +8 -0
- data/docs/MetadataPropertiesEnvelope.md +8 -0
- data/docs/MetadataQueryEnvelope.md +11 -0
- data/docs/MetadataRequest.md +7 -0
- data/docs/Task.md +18 -0
- data/docs/TaskByDid.md +19 -0
- data/docs/TaskByDidList.md +8 -0
- data/docs/TaskByDidListEnvelope.md +11 -0
- data/docs/TaskEnvelope.md +8 -0
- data/docs/TaskHistory.md +13 -0
- data/docs/TaskHistoryList.md +8 -0
- data/docs/TaskList.md +8 -0
- data/docs/TaskListEnvelope.md +12 -0
- data/docs/TaskParameters.md +9 -0
- data/docs/TaskRequest.md +13 -0
- data/docs/TaskStatus.md +13 -0
- data/docs/TaskStatusCounts.md +12 -0
- data/docs/TaskStatuses.md +19 -0
- data/docs/TaskStatusesEnvelope.md +11 -0
- data/docs/TaskStatusesHistoryEnvelope.md +8 -0
- data/docs/TaskUpdateRequest.md +8 -0
- data/docs/TaskUpdateResponse.md +8 -0
- data/docs/TasksStatusCounts.md +11 -0
- data/lib/artikcloud/api/device_types_api.rb +66 -0
- data/lib/artikcloud/api/devices_management_api.rb +971 -0
- data/lib/artikcloud/models/device_task.rb +250 -0
- data/lib/artikcloud/models/device_task_update_request.rb +200 -0
- data/lib/artikcloud/models/device_task_update_response.rb +200 -0
- data/lib/artikcloud/models/device_type_info.rb +260 -0
- data/lib/artikcloud/models/device_type_info_envelope.rb +199 -0
- data/lib/artikcloud/models/device_types_info.rb +260 -0
- data/lib/artikcloud/models/device_types_info_envelope.rb +199 -0
- data/lib/artikcloud/models/event_feed_data.rb +222 -0
- data/lib/artikcloud/models/metadata_envelope.rb +202 -0
- data/lib/artikcloud/models/metadata_properties_envelope.rb +201 -0
- data/lib/artikcloud/models/metadata_query_envelope.rb +232 -0
- data/lib/artikcloud/models/metadata_request.rb +190 -0
- data/lib/artikcloud/models/task.rb +302 -0
- data/lib/artikcloud/models/task_by_did.rb +314 -0
- data/lib/artikcloud/models/task_by_did_list.rb +202 -0
- data/lib/artikcloud/models/task_by_did_list_envelope.rb +230 -0
- data/lib/artikcloud/models/task_envelope.rb +200 -0
- data/lib/artikcloud/models/task_history.rb +250 -0
- data/lib/artikcloud/models/task_history_list.rb +202 -0
- data/lib/artikcloud/models/task_list.rb +202 -0
- data/lib/artikcloud/models/task_list_envelope.rb +240 -0
- data/lib/artikcloud/models/task_parameters.rb +210 -0
- data/lib/artikcloud/models/task_request.rb +252 -0
- data/lib/artikcloud/models/task_status.rb +250 -0
- data/lib/artikcloud/models/task_status_counts.rb +240 -0
- data/lib/artikcloud/models/task_statuses.rb +314 -0
- data/lib/artikcloud/models/task_statuses_envelope.rb +230 -0
- data/lib/artikcloud/models/task_statuses_history_envelope.rb +200 -0
- data/lib/artikcloud/models/task_update_request.rb +200 -0
- data/lib/artikcloud/models/task_update_response.rb +200 -0
- data/lib/artikcloud/models/tasks_status_counts.rb +230 -0
- data/lib/artikcloud/version.rb +1 -1
- data/lib/artikcloud.rb +31 -0
- data/pom.xml +1 -1
- data/spec/api/devices_api_spec.rb +7 -10
- data/spec/api/devices_management_api_spec.rb +251 -0
- data/spec/api/messages_api_spec.rb +67 -25
- data/spec/api/tokens_api_spec.rb +10 -33
- data/spec/api/users_api_spec.rb +65 -14
- data/spec/api_client_spec.rb +237 -0
- data/spec/configuration_spec.rb +53 -0
- data/spec/factories/devices.rb +32 -0
- data/spec/factories/users.rb +31 -0
- data/spec/fixtures/cassettes/DevicesApi/get_device_presence_test/should_work.yml +50 -0
- data/spec/fixtures/cassettes/MessagesApi/get_message_snapshots/should_work.yml +54 -0
- data/spec/fixtures/cassettes/MessagesApi/send_actions/should_work.yml +93 -0
- data/spec/fixtures/cassettes/MessagesApi/send_message_action_test/should_work.yml +99 -0
- data/spec/fixtures/cassettes/TokensApi/refresh_token_test/should_work.yml +43 -0
- data/spec/fixtures/cassettes/TokensApi/token_info_test/should_work.yml +38 -0
- data/spec/fixtures/cassettes/UsersApi/get_self_test/should_work.yml +53 -0
- data/spec/fixtures/cassettes/UsersApi/get_user_device_types_test/should_work.yml +55 -0
- data/spec/fixtures/cassettes/UsersApi/get_user_devices_test/should_work.yml +55 -0
- data/spec/fixtures/cassettes/UsersApi/get_user_properties_update_user_properties_and_delete_user_properties_test/should_work.yml +52 -0
- data/spec/fixtures/cassettes/UsersApi/get_user_rules_test/should_work.yml +58 -0
- data/spec/spec_helper.rb +20 -5
- metadata +142 -46
@@ -0,0 +1,10 @@
|
|
1
|
+
# ArtikCloud::EventFeedData
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**event** | **String** | Event | [optional]
|
7
|
+
**ts** | **Integer** | Timestamp | [optional]
|
8
|
+
**data** | **Hash<String, Object>** | Message Payload | [optional]
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# ArtikCloud::MetadataQueryEnvelope
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**total** | **Integer** | Number of results found | [optional]
|
7
|
+
**data** | **Hash<String, Object>** | Array of objects with device's metadata | [optional]
|
8
|
+
**offset** | **Integer** | Page starting position | [optional]
|
9
|
+
**count** | **Integer** | Page size | [optional]
|
10
|
+
|
11
|
+
|
data/docs/Task.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# ArtikCloud::Task
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**filter** | **String** | Filter | [optional]
|
7
|
+
**task_type** | **String** | Task type | [optional]
|
8
|
+
**modified_on** | **Integer** | Modified on | [optional]
|
9
|
+
**dtid** | **String** | Device Type ID | [optional]
|
10
|
+
**status_counts** | [**TaskStatusCounts**](TaskStatusCounts.md) | Status counts | [optional]
|
11
|
+
**property** | **String** | Property | [optional]
|
12
|
+
**id** | **String** | Task ID | [optional]
|
13
|
+
**dids** | **Array<String>** | Device IDs | [optional]
|
14
|
+
**task_parameters** | [**TaskParameters**](TaskParameters.md) | Task parameters | [optional]
|
15
|
+
**created_on** | **Integer** | Created on | [optional]
|
16
|
+
**status** | **String** | Status | [optional]
|
17
|
+
|
18
|
+
|
data/docs/TaskByDid.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# ArtikCloud::TaskByDid
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**filter** | **String** | Filter | [optional]
|
7
|
+
**task_type** | **String** | Task type | [optional]
|
8
|
+
**modified_on** | **Integer** | Modified on | [optional]
|
9
|
+
**dtid** | **String** | Device Type ID | [optional]
|
10
|
+
**status_counts** | [**TaskStatusCounts**](TaskStatusCounts.md) | Status counts | [optional]
|
11
|
+
**property** | **String** | Property | [optional]
|
12
|
+
**statuses** | [**Array<DeviceTask>**](DeviceTask.md) | Last known device task status for the specified did | [optional]
|
13
|
+
**id** | **String** | Task ID | [optional]
|
14
|
+
**dids** | **Array<String>** | Device IDs | [optional]
|
15
|
+
**task_parameters** | [**TaskParameters**](TaskParameters.md) | Task parameters | [optional]
|
16
|
+
**created_on** | **Integer** | Created on | [optional]
|
17
|
+
**status** | **String** | Status | [optional]
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# ArtikCloud::TaskByDidListEnvelope
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**total** | **Integer** | Total number of tasks in list | [optional]
|
7
|
+
**data** | [**TaskByDidList**](TaskByDidList.md) | Device task list envelope | [optional]
|
8
|
+
**offset** | **Integer** | Offset if using pagination | [optional]
|
9
|
+
**count** | **Integer** | Count for current result set | [optional]
|
10
|
+
|
11
|
+
|
data/docs/TaskHistory.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# ArtikCloud::TaskHistory
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**num_attempts** | **Integer** | Number of attempts | [optional]
|
7
|
+
**error_message** | **String** | Error Message | [optional]
|
8
|
+
**error_code** | **String** | Error Code | [optional]
|
9
|
+
**did** | **String** | Device ID | [optional]
|
10
|
+
**status** | **String** | Status | [optional]
|
11
|
+
**ts** | **Integer** | Timestamp of most recent status change | [optional]
|
12
|
+
|
13
|
+
|
data/docs/TaskList.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# ArtikCloud::TaskListEnvelope
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**total** | **Integer** | Total | [optional]
|
7
|
+
**data** | [**TaskList**](TaskList.md) | Envelope for task list | [optional]
|
8
|
+
**status_counts** | [**TasksStatusCounts**](TasksStatusCounts.md) | Status counts | [optional]
|
9
|
+
**offset** | **Integer** | Offset | [optional]
|
10
|
+
**count** | **Integer** | Count | [optional]
|
11
|
+
|
12
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# ArtikCloud::TaskParameters
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**expires_after** | **Integer** | Expire time in seconds | [optional]
|
7
|
+
**value** | **String** | Value to write | [optional]
|
8
|
+
|
9
|
+
|
data/docs/TaskRequest.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# ArtikCloud::TaskRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**filter** | **String** | Filter | [optional]
|
7
|
+
**task_type** | **String** | Task type | [optional]
|
8
|
+
**dtid** | **String** | Device Type ID | [optional]
|
9
|
+
**property** | **String** | Property | [optional]
|
10
|
+
**dids** | **Array<String>** | Device IDs | [optional]
|
11
|
+
**task_parameters** | [**TaskParameters**](TaskParameters.md) | Task parameters | [optional]
|
12
|
+
|
13
|
+
|
data/docs/TaskStatus.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# ArtikCloud::TaskStatus
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**num_attempts** | **Integer** | Number of attempts | [optional]
|
7
|
+
**error_message** | **String** | Error Message | [optional]
|
8
|
+
**error_code** | **String** | Error Code | [optional]
|
9
|
+
**did** | **String** | Device ID | [optional]
|
10
|
+
**status** | **String** | Status | [optional]
|
11
|
+
**ts** | **Integer** | Timestamp of most recent status change | [optional]
|
12
|
+
|
13
|
+
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# ArtikCloud::TaskStatusCounts
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**num_failed** | **Integer** | Number failed | [optional]
|
7
|
+
**num_cancelled** | **Integer** | Number cancelled | [optional]
|
8
|
+
**total_devices** | **Integer** | Total devices | [optional]
|
9
|
+
**num_completed** | **Integer** | Number completed | [optional]
|
10
|
+
**num_succeeded** | **Integer** | Number succeeded | [optional]
|
11
|
+
|
12
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# ArtikCloud::TaskStatuses
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**filter** | **String** | Filter | [optional]
|
7
|
+
**task_type** | **String** | Task type | [optional]
|
8
|
+
**modified_on** | **Integer** | Modified on | [optional]
|
9
|
+
**dtid** | **String** | Device Type ID | [optional]
|
10
|
+
**status_counts** | [**TaskStatusCounts**](TaskStatusCounts.md) | Status counts | [optional]
|
11
|
+
**property** | **String** | Property | [optional]
|
12
|
+
**statuses** | [**Array<TaskStatus>**](TaskStatus.md) | Statuses | [optional]
|
13
|
+
**id** | **String** | Task ID | [optional]
|
14
|
+
**dids** | **Array<String>** | Device IDs | [optional]
|
15
|
+
**task_parameters** | [**TaskParameters**](TaskParameters.md) | Task parameters | [optional]
|
16
|
+
**created_on** | **Integer** | Created on | [optional]
|
17
|
+
**status** | **String** | Status | [optional]
|
18
|
+
|
19
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# ArtikCloud::TaskStatusesEnvelope
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**total** | **Integer** | Total | [optional]
|
7
|
+
**data** | [**TaskStatuses**](TaskStatuses.md) | Task statuses | [optional]
|
8
|
+
**offset** | **Integer** | Offset | [optional]
|
9
|
+
**count** | **Integer** | Count | [optional]
|
10
|
+
|
11
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# ArtikCloud::TasksStatusCounts
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**cancelled** | **Integer** | Cancelled | [optional]
|
7
|
+
**complete** | **Integer** | Complete | [optional]
|
8
|
+
**processing** | **Integer** | Processing | [optional]
|
9
|
+
**requested** | **Integer** | Requested | [optional]
|
10
|
+
|
11
|
+
|
@@ -212,6 +212,72 @@ module ArtikCloud
|
|
212
212
|
return data, status_code, headers
|
213
213
|
end
|
214
214
|
|
215
|
+
# Get Device Types by Application
|
216
|
+
# Get Device Types by Application
|
217
|
+
# @param app_id Application ID.
|
218
|
+
# @param [Hash] opts the optional parameters
|
219
|
+
# @option opts [BOOLEAN] :product_info Flag to include the associated ProductInfo if present
|
220
|
+
# @option opts [Integer] :count Desired count of items in the result set.
|
221
|
+
# @option opts [Integer] :offset Offset for pagination.
|
222
|
+
# @return [DeviceTypesEnvelope]
|
223
|
+
def get_device_types_by_application(app_id, opts = {})
|
224
|
+
data, _status_code, _headers = get_device_types_by_application_with_http_info(app_id, opts)
|
225
|
+
return data
|
226
|
+
end
|
227
|
+
|
228
|
+
# Get Device Types by Application
|
229
|
+
# Get Device Types by Application
|
230
|
+
# @param app_id Application ID.
|
231
|
+
# @param [Hash] opts the optional parameters
|
232
|
+
# @option opts [BOOLEAN] :product_info Flag to include the associated ProductInfo if present
|
233
|
+
# @option opts [Integer] :count Desired count of items in the result set.
|
234
|
+
# @option opts [Integer] :offset Offset for pagination.
|
235
|
+
# @return [Array<(DeviceTypesEnvelope, Fixnum, Hash)>] DeviceTypesEnvelope data, response status code and response headers
|
236
|
+
def get_device_types_by_application_with_http_info(app_id, opts = {})
|
237
|
+
if @api_client.config.debugging
|
238
|
+
@api_client.config.logger.debug "Calling API: DeviceTypesApi.get_device_types_by_application ..."
|
239
|
+
end
|
240
|
+
# verify the required parameter 'app_id' is set
|
241
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling DeviceTypesApi.get_device_types_by_application" if app_id.nil?
|
242
|
+
# resource path
|
243
|
+
local_var_path = "/applications/{appId}/devicetypes".sub('{format}','json').sub('{' + 'appId' + '}', app_id.to_s)
|
244
|
+
|
245
|
+
# query parameters
|
246
|
+
query_params = {}
|
247
|
+
query_params[:'productInfo'] = opts[:'product_info'] if !opts[:'product_info'].nil?
|
248
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
249
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
250
|
+
|
251
|
+
# header parameters
|
252
|
+
header_params = {}
|
253
|
+
|
254
|
+
# HTTP header 'Accept' (if needed)
|
255
|
+
local_header_accept = ['application/json']
|
256
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
257
|
+
|
258
|
+
# HTTP header 'Content-Type'
|
259
|
+
local_header_content_type = []
|
260
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
261
|
+
|
262
|
+
# form parameters
|
263
|
+
form_params = {}
|
264
|
+
|
265
|
+
# http body (model)
|
266
|
+
post_body = nil
|
267
|
+
auth_names = ['artikcloud_oauth']
|
268
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
269
|
+
:header_params => header_params,
|
270
|
+
:query_params => query_params,
|
271
|
+
:form_params => form_params,
|
272
|
+
:body => post_body,
|
273
|
+
:auth_names => auth_names,
|
274
|
+
:return_type => 'DeviceTypesEnvelope')
|
275
|
+
if @api_client.config.debugging
|
276
|
+
@api_client.config.logger.debug "API called: DeviceTypesApi#get_device_types_by_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
277
|
+
end
|
278
|
+
return data, status_code, headers
|
279
|
+
end
|
280
|
+
|
215
281
|
# Get Latest Manifest Properties
|
216
282
|
# Get a Device Type's manifest properties for the latest version.
|
217
283
|
# @param device_type_id Device Type ID.
|