artikcloud 2.0.5 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +23 -1
  3. data/LICENSE +1 -2
  4. data/README.md +50 -4
  5. data/artikcloud.gemspec +29 -5
  6. data/docs/DeviceTask.md +13 -0
  7. data/docs/DeviceTaskUpdateRequest.md +8 -0
  8. data/docs/DeviceTaskUpdateResponse.md +8 -0
  9. data/docs/DeviceTypeInfo.md +14 -0
  10. data/docs/DeviceTypeInfoEnvelope.md +8 -0
  11. data/docs/DeviceTypesApi.md +61 -0
  12. data/docs/DeviceTypesInfo.md +14 -0
  13. data/docs/DeviceTypesInfoEnvelope.md +8 -0
  14. data/docs/DevicesManagementApi.md +870 -0
  15. data/docs/EventFeedData.md +10 -0
  16. data/docs/MetadataEnvelope.md +8 -0
  17. data/docs/MetadataPropertiesEnvelope.md +8 -0
  18. data/docs/MetadataQueryEnvelope.md +11 -0
  19. data/docs/MetadataRequest.md +7 -0
  20. data/docs/Task.md +18 -0
  21. data/docs/TaskByDid.md +19 -0
  22. data/docs/TaskByDidList.md +8 -0
  23. data/docs/TaskByDidListEnvelope.md +11 -0
  24. data/docs/TaskEnvelope.md +8 -0
  25. data/docs/TaskHistory.md +13 -0
  26. data/docs/TaskHistoryList.md +8 -0
  27. data/docs/TaskList.md +8 -0
  28. data/docs/TaskListEnvelope.md +12 -0
  29. data/docs/TaskParameters.md +9 -0
  30. data/docs/TaskRequest.md +13 -0
  31. data/docs/TaskStatus.md +13 -0
  32. data/docs/TaskStatusCounts.md +12 -0
  33. data/docs/TaskStatuses.md +19 -0
  34. data/docs/TaskStatusesEnvelope.md +11 -0
  35. data/docs/TaskStatusesHistoryEnvelope.md +8 -0
  36. data/docs/TaskUpdateRequest.md +8 -0
  37. data/docs/TaskUpdateResponse.md +8 -0
  38. data/docs/TasksStatusCounts.md +11 -0
  39. data/lib/artikcloud/api/device_types_api.rb +66 -0
  40. data/lib/artikcloud/api/devices_management_api.rb +971 -0
  41. data/lib/artikcloud/models/device_task.rb +250 -0
  42. data/lib/artikcloud/models/device_task_update_request.rb +200 -0
  43. data/lib/artikcloud/models/device_task_update_response.rb +200 -0
  44. data/lib/artikcloud/models/device_type_info.rb +260 -0
  45. data/lib/artikcloud/models/device_type_info_envelope.rb +199 -0
  46. data/lib/artikcloud/models/device_types_info.rb +260 -0
  47. data/lib/artikcloud/models/device_types_info_envelope.rb +199 -0
  48. data/lib/artikcloud/models/event_feed_data.rb +222 -0
  49. data/lib/artikcloud/models/metadata_envelope.rb +202 -0
  50. data/lib/artikcloud/models/metadata_properties_envelope.rb +201 -0
  51. data/lib/artikcloud/models/metadata_query_envelope.rb +232 -0
  52. data/lib/artikcloud/models/metadata_request.rb +190 -0
  53. data/lib/artikcloud/models/task.rb +302 -0
  54. data/lib/artikcloud/models/task_by_did.rb +314 -0
  55. data/lib/artikcloud/models/task_by_did_list.rb +202 -0
  56. data/lib/artikcloud/models/task_by_did_list_envelope.rb +230 -0
  57. data/lib/artikcloud/models/task_envelope.rb +200 -0
  58. data/lib/artikcloud/models/task_history.rb +250 -0
  59. data/lib/artikcloud/models/task_history_list.rb +202 -0
  60. data/lib/artikcloud/models/task_list.rb +202 -0
  61. data/lib/artikcloud/models/task_list_envelope.rb +240 -0
  62. data/lib/artikcloud/models/task_parameters.rb +210 -0
  63. data/lib/artikcloud/models/task_request.rb +252 -0
  64. data/lib/artikcloud/models/task_status.rb +250 -0
  65. data/lib/artikcloud/models/task_status_counts.rb +240 -0
  66. data/lib/artikcloud/models/task_statuses.rb +314 -0
  67. data/lib/artikcloud/models/task_statuses_envelope.rb +230 -0
  68. data/lib/artikcloud/models/task_statuses_history_envelope.rb +200 -0
  69. data/lib/artikcloud/models/task_update_request.rb +200 -0
  70. data/lib/artikcloud/models/task_update_response.rb +200 -0
  71. data/lib/artikcloud/models/tasks_status_counts.rb +230 -0
  72. data/lib/artikcloud/version.rb +1 -1
  73. data/lib/artikcloud.rb +31 -0
  74. data/pom.xml +1 -1
  75. data/spec/api/devices_api_spec.rb +7 -10
  76. data/spec/api/devices_management_api_spec.rb +251 -0
  77. data/spec/api/messages_api_spec.rb +67 -25
  78. data/spec/api/tokens_api_spec.rb +10 -33
  79. data/spec/api/users_api_spec.rb +65 -14
  80. data/spec/api_client_spec.rb +237 -0
  81. data/spec/configuration_spec.rb +53 -0
  82. data/spec/factories/devices.rb +32 -0
  83. data/spec/factories/users.rb +31 -0
  84. data/spec/fixtures/cassettes/DevicesApi/get_device_presence_test/should_work.yml +50 -0
  85. data/spec/fixtures/cassettes/MessagesApi/get_message_snapshots/should_work.yml +54 -0
  86. data/spec/fixtures/cassettes/MessagesApi/send_actions/should_work.yml +93 -0
  87. data/spec/fixtures/cassettes/MessagesApi/send_message_action_test/should_work.yml +99 -0
  88. data/spec/fixtures/cassettes/TokensApi/refresh_token_test/should_work.yml +43 -0
  89. data/spec/fixtures/cassettes/TokensApi/token_info_test/should_work.yml +38 -0
  90. data/spec/fixtures/cassettes/UsersApi/get_self_test/should_work.yml +53 -0
  91. data/spec/fixtures/cassettes/UsersApi/get_user_device_types_test/should_work.yml +55 -0
  92. data/spec/fixtures/cassettes/UsersApi/get_user_devices_test/should_work.yml +55 -0
  93. data/spec/fixtures/cassettes/UsersApi/get_user_properties_update_user_properties_and_delete_user_properties_test/should_work.yml +52 -0
  94. data/spec/fixtures/cassettes/UsersApi/get_user_rules_test/should_work.yml +58 -0
  95. data/spec/spec_helper.rb +20 -5
  96. 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,8 @@
1
+ # ArtikCloud::MetadataEnvelope
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | **Hash<String, Object>** | Free form JSON object | [optional]
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # ArtikCloud::MetadataPropertiesEnvelope
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | **Hash<String, Object>** | | [optional]
7
+
8
+
@@ -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
+
@@ -0,0 +1,7 @@
1
+ # ArtikCloud::MetadataRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
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,8 @@
1
+ # ArtikCloud::TaskByDidList
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **tasks** | [**Array<TaskByDid>**](TaskByDid.md) | Task list | [optional]
7
+
8
+
@@ -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
+
@@ -0,0 +1,8 @@
1
+ # ArtikCloud::TaskEnvelope
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**Task**](Task.md) | Task details envelope | [optional]
7
+
8
+
@@ -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
+
@@ -0,0 +1,8 @@
1
+ # ArtikCloud::TaskHistoryList
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **history** | [**Array<TaskHistory>**](TaskHistory.md) | Status history | [optional]
7
+
8
+
data/docs/TaskList.md ADDED
@@ -0,0 +1,8 @@
1
+ # ArtikCloud::TaskList
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **tasks** | [**Array<Task>**](Task.md) | Task list | [optional]
7
+
8
+
@@ -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
+
@@ -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
+
@@ -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,8 @@
1
+ # ArtikCloud::TaskStatusesHistoryEnvelope
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**TaskHistoryList**](TaskHistoryList.md) | Task statuses history | [optional]
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # ArtikCloud::TaskUpdateRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **status** | **String** | Status | [optional]
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # ArtikCloud::TaskUpdateResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **data** | [**Task**](Task.md) | Task | [optional]
7
+
8
+
@@ -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.