artikcloud 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -11
- data/artikcloud.gemspec +1 -1
- data/docs/.DS_Store +0 -0
- data/docs/DeviceShareInfo.md +1 -1
- data/docs/UsersApi.md +1 -1
- data/lib/.DS_Store +0 -0
- data/lib/artikcloud/.DS_Store +0 -0
- data/lib/artikcloud/api/.DS_Store +0 -0
- data/lib/artikcloud/api/{devicesshares_api.rb → devices_shares_api.rb} +20 -20
- data/lib/artikcloud/api/{devicestatus_api.rb → devices_status_api.rb} +10 -10
- data/lib/artikcloud/api/users_api.rb +7 -1
- data/lib/artikcloud/models/.DS_Store +0 -0
- data/lib/artikcloud/models/device_share_info.rb +7 -7
- data/lib/artikcloud/version.rb +1 -5
- data/lib/artikcloud.rb +2 -2
- data/pom.xml +1 -1
- data/spec/.DS_Store +0 -0
- data/spec/api/.DS_Store +0 -0
- data/spec/api/device_types_api_spec.rb +1 -1
- data/spec/api/devices_api_spec.rb +8 -1
- data/spec/api/{devicesshares_api_spec.rb → devices_shares_api_spec.rb} +6 -6
- data/spec/api/{devicestatus_api_spec.rb → devices_status_api_spec.rb} +6 -6
- data/spec/api/export_api_spec.rb +2 -2
- data/spec/api/messages_api_spec.rb +20 -10
- data/spec/api/registrations_api_spec.rb +1 -1
- data/spec/api/rules_api_spec.rb +1 -1
- data/spec/api/tags_api_spec.rb +2 -2
- data/spec/api/tokens_api_spec.rb +16 -3
- data/spec/models/device_share_info_spec.rb +41 -0
- data/spec/models/device_sharing_array_spec.rb +41 -0
- data/spec/models/device_sharing_envelope_spec.rb +59 -0
- data/spec/models/device_sharing_id_spec.rb +41 -0
- data/spec/models/device_sharing_spec.rb +59 -0
- data/spec/models/device_spec.rb +12 -0
- data/spec/models/device_status_batch_spec.rb +59 -0
- data/spec/models/device_status_data_spec.rb +65 -0
- data/spec/models/device_status_put_data_spec.rb +41 -0
- data/spec/models/device_status_put_spec.rb +41 -0
- data/spec/models/device_status_spec.rb +47 -0
- data/spec/models/notif_message_array_spec.rb +41 -0
- data/spec/models/notif_message_spec.rb +83 -0
- data/spec/models/notif_messages_response_spec.rb +65 -0
- data/spec/models/subscription_array_spec.rb +41 -0
- data/spec/models/subscription_envelope_spec.rb +41 -0
- data/spec/models/subscription_info_spec.rb +113 -0
- data/spec/models/subscription_spec.rb +137 -0
- data/spec/models/subscriptions_envelope_spec.rb +59 -0
- data/spec/models/task_parameters_spec.rb +12 -0
- data/spec/models/update_parameters_spec.rb +41 -0
- data/spec/models/validation_callback_info_spec.rb +47 -0
- data/spec/spec_helper.rb +79 -6
- metadata +57 -13
- data/docs/DevicessharesApi.md +0 -235
- data/docs/DevicestatusApi.md +0 -183
- data/docs/MetadataRequest.md +0 -7
- data/lib/artikcloud/models/metadata_request.rb +0 -190
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fd5bfde84a5891f93015474b97fdd4e37911c1d
|
4
|
+
data.tar.gz: 9692f46d11091a01fe5f3a05aaaae49cec921ed6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 396882d3e06d5517a32de2f5d47fac90c8a1483fa88024163c04e78eeec130a41e5a76690ea573c9b196c2808192582d53615281585d1e806d22f76b7e46a531
|
7
|
+
data.tar.gz: 9063fb3b3222eeed1e1d405202a9da6ef20e4d3bfc4d0a3c20bac3462abdb236f10abc47d62c33aaae432633b4e49e348eb3163b924e3e1798f468055ce79300
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
ARTIK Cloud Ruby SDK
|
2
2
|
================
|
3
3
|
|
4
|
-
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/artikcloud.svg)](https://badge.fury.io/rb/artikcloud)
|
5
5
|
|
6
6
|
This SDK helps you connect your Ruby scripts to ARTIK Cloud. The SDK exposes a number of methods to easily execute REST API calls to ARTIK Cloud.
|
7
7
|
|
@@ -18,7 +18,7 @@ gem build artikcloud.gemspec
|
|
18
18
|
Then either install the gem locally:
|
19
19
|
|
20
20
|
```shell
|
21
|
-
gem install ./artikcloud-2.1.
|
21
|
+
gem install ./artikcloud-2.1.1.gem
|
22
22
|
```
|
23
23
|
(for development, run `gem install --dev ./artikcloud-2.1.0.gem` to install the development dependencies)
|
24
24
|
|
@@ -26,7 +26,7 @@ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.or
|
|
26
26
|
|
27
27
|
Finally add this to the Gemfile:
|
28
28
|
|
29
|
-
gem 'artikcloud', '~> 2.1.
|
29
|
+
gem 'artikcloud', '~> 2.1.1'
|
30
30
|
|
31
31
|
### Install from Git
|
32
32
|
|
@@ -105,13 +105,13 @@ Class | Method | HTTP request | Description
|
|
105
105
|
*ArtikCloud::DevicesManagementApi* | [**update_server_properties**](docs/DevicesManagementApi.md#update_server_properties) | **POST** /devicemgmt/devices/{did}/serverproperties | Updates a device's server properties.
|
106
106
|
*ArtikCloud::DevicesManagementApi* | [**update_task**](docs/DevicesManagementApi.md#update_task) | **PUT** /devicemgmt/tasks/{tid} | Updates a task for all devices - For now just allows changing the state to cancelled.
|
107
107
|
*ArtikCloud::DevicesManagementApi* | [**update_task_for_device**](docs/DevicesManagementApi.md#update_task_for_device) | **PUT** /devicemgmt/tasks/{tid}/devices/{did} | Updates a task for a specific device - For now just allows changing the state to cancelled.
|
108
|
-
*ArtikCloud::
|
109
|
-
*ArtikCloud::
|
110
|
-
*ArtikCloud::
|
111
|
-
*ArtikCloud::
|
112
|
-
*ArtikCloud::
|
113
|
-
*ArtikCloud::
|
114
|
-
*ArtikCloud::
|
108
|
+
*ArtikCloud::DevicesSharesApi* | [**create_share_for_device**](docs/DevicesSharesApi.md#create_share_for_device) | **POST** /devices/{deviceId}/shares | Share a device
|
109
|
+
*ArtikCloud::DevicesSharesApi* | [**delete_sharing_for_device**](docs/DevicesSharesApi.md#delete_sharing_for_device) | **DELETE** /devices/{deviceId}/shares/{shareId} | Delete specific share of the given device id
|
110
|
+
*ArtikCloud::DevicesSharesApi* | [**get_all_shares_for_device**](docs/DevicesSharesApi.md#get_all_shares_for_device) | **GET** /devices/{deviceId}/shares | List all shares for the given device id
|
111
|
+
*ArtikCloud::DevicesSharesApi* | [**get_sharing_for_device**](docs/DevicesSharesApi.md#get_sharing_for_device) | **GET** /devices/{deviceId}/shares/{shareId} | Get specific share of the given device id
|
112
|
+
*ArtikCloud::DevicesStatusApi* | [**get_device_status**](docs/DevicesStatusApi.md#get_device_status) | **GET** /devices/{deviceId}/status | Get Device Status
|
113
|
+
*ArtikCloud::DevicesStatusApi* | [**get_devices_status**](docs/DevicesStatusApi.md#get_devices_status) | **GET** /devices/status | Get Devices Status
|
114
|
+
*ArtikCloud::DevicesStatusApi* | [**put_device_status**](docs/DevicesStatusApi.md#put_device_status) | **PUT** /devices/{deviceId}/status | Update Device Status
|
115
115
|
*ArtikCloud::ExportApi* | [**export_request**](docs/ExportApi.md#export_request) | **POST** /messages/export | Create Export Request
|
116
116
|
*ArtikCloud::ExportApi* | [**get_export_history**](docs/ExportApi.md#get_export_history) | **GET** /messages/export/history | Get Export History
|
117
117
|
*ArtikCloud::ExportApi* | [**get_export_result**](docs/ExportApi.md#get_export_result) | **GET** /messages/export/{exportId}/result | Get Export Result
|
@@ -151,7 +151,7 @@ Class | Method | HTTP request | Description
|
|
151
151
|
*ArtikCloud::UsersApi* | [**get_user_devices**](docs/UsersApi.md#get_user_devices) | **GET** /users/{userId}/devices | Get User Devices
|
152
152
|
*ArtikCloud::UsersApi* | [**get_user_properties**](docs/UsersApi.md#get_user_properties) | **GET** /users/{userId}/properties | Get User application properties
|
153
153
|
*ArtikCloud::UsersApi* | [**get_user_rules**](docs/UsersApi.md#get_user_rules) | **GET** /users/{userId}/rules | Get User Rules
|
154
|
-
*ArtikCloud::UsersApi* | [**list_all_shares_for_user**](docs/UsersApi.md#list_all_shares_for_user) | **GET**
|
154
|
+
*ArtikCloud::UsersApi* | [**list_all_shares_for_user**](docs/UsersApi.md#list_all_shares_for_user) | **GET** /users/{userId}/shares | Get User shares
|
155
155
|
*ArtikCloud::UsersApi* | [**update_user_properties**](docs/UsersApi.md#update_user_properties) | **PUT** /users/{userId}/properties | Update User Application Properties
|
156
156
|
|
157
157
|
|
data/artikcloud.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.name = "artikcloud"
|
19
19
|
s.version = ArtikCloud::VERSION
|
20
20
|
s.platform = Gem::Platform::RUBY
|
21
|
-
s.authors = ["
|
21
|
+
s.authors = ["ARTIK Cloud"]
|
22
22
|
s.email = [""]
|
23
23
|
s.homepage = "http://github.com/artikcloud/artikcloud-ruby"
|
24
24
|
s.summary = "ArtikCloud Ruby SDK"
|
data/docs/.DS_Store
ADDED
Binary file
|
data/docs/DeviceShareInfo.md
CHANGED
data/docs/UsersApi.md
CHANGED
@@ -11,7 +11,7 @@ Method | HTTP request | Description
|
|
11
11
|
[**get_user_devices**](UsersApi.md#get_user_devices) | **GET** /users/{userId}/devices | Get User Devices
|
12
12
|
[**get_user_properties**](UsersApi.md#get_user_properties) | **GET** /users/{userId}/properties | Get User application properties
|
13
13
|
[**get_user_rules**](UsersApi.md#get_user_rules) | **GET** /users/{userId}/rules | Get User Rules
|
14
|
-
[**list_all_shares_for_user**](UsersApi.md#list_all_shares_for_user) | **GET**
|
14
|
+
[**list_all_shares_for_user**](UsersApi.md#list_all_shares_for_user) | **GET** /users/{userId}/shares | Get User shares
|
15
15
|
[**update_user_properties**](UsersApi.md#update_user_properties) | **PUT** /users/{userId}/properties | Update User Application Properties
|
16
16
|
|
17
17
|
|
data/lib/.DS_Store
ADDED
Binary file
|
Binary file
|
Binary file
|
@@ -12,7 +12,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
12
12
|
require "uri"
|
13
13
|
|
14
14
|
module ArtikCloud
|
15
|
-
class
|
15
|
+
class DevicesSharesApi
|
16
16
|
attr_accessor :api_client
|
17
17
|
|
18
18
|
def initialize(api_client = ApiClient.default)
|
@@ -38,14 +38,14 @@ module ArtikCloud
|
|
38
38
|
# @return [Array<(DeviceSharingId, Fixnum, Hash)>] DeviceSharingId data, response status code and response headers
|
39
39
|
def create_share_for_device_with_http_info(device_id, device_share_info, opts = {})
|
40
40
|
if @api_client.config.debugging
|
41
|
-
@api_client.config.logger.debug "Calling API:
|
41
|
+
@api_client.config.logger.debug "Calling API: DevicesSharesApi.create_share_for_device ..."
|
42
42
|
end
|
43
43
|
# verify the required parameter 'device_id' is set
|
44
|
-
fail ArgumentError, "Missing the required parameter 'device_id' when calling
|
44
|
+
fail ArgumentError, "Missing the required parameter 'device_id' when calling DevicesSharesApi.create_share_for_device" if device_id.nil?
|
45
45
|
# verify the required parameter 'device_share_info' is set
|
46
|
-
fail ArgumentError, "Missing the required parameter 'device_share_info' when calling
|
46
|
+
fail ArgumentError, "Missing the required parameter 'device_share_info' when calling DevicesSharesApi.create_share_for_device" if device_share_info.nil?
|
47
47
|
# resource path
|
48
|
-
local_var_path = "
|
48
|
+
local_var_path = "/devices/{deviceId}/shares".sub('{format}','json').sub('{' + 'deviceId' + '}', device_id.to_s)
|
49
49
|
|
50
50
|
# query parameters
|
51
51
|
query_params = {}
|
@@ -69,7 +69,7 @@ module ArtikCloud
|
|
69
69
|
:auth_names => auth_names,
|
70
70
|
:return_type => 'DeviceSharingId')
|
71
71
|
if @api_client.config.debugging
|
72
|
-
@api_client.config.logger.debug "API called:
|
72
|
+
@api_client.config.logger.debug "API called: DevicesSharesApi#create_share_for_device\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
73
73
|
end
|
74
74
|
return data, status_code, headers
|
75
75
|
end
|
@@ -93,14 +93,14 @@ module ArtikCloud
|
|
93
93
|
# @return [Array<(DeviceSharingId, Fixnum, Hash)>] DeviceSharingId data, response status code and response headers
|
94
94
|
def delete_sharing_for_device_with_http_info(device_id, share_id, opts = {})
|
95
95
|
if @api_client.config.debugging
|
96
|
-
@api_client.config.logger.debug "Calling API:
|
96
|
+
@api_client.config.logger.debug "Calling API: DevicesSharesApi.delete_sharing_for_device ..."
|
97
97
|
end
|
98
98
|
# verify the required parameter 'device_id' is set
|
99
|
-
fail ArgumentError, "Missing the required parameter 'device_id' when calling
|
99
|
+
fail ArgumentError, "Missing the required parameter 'device_id' when calling DevicesSharesApi.delete_sharing_for_device" if device_id.nil?
|
100
100
|
# verify the required parameter 'share_id' is set
|
101
|
-
fail ArgumentError, "Missing the required parameter 'share_id' when calling
|
101
|
+
fail ArgumentError, "Missing the required parameter 'share_id' when calling DevicesSharesApi.delete_sharing_for_device" if share_id.nil?
|
102
102
|
# resource path
|
103
|
-
local_var_path = "
|
103
|
+
local_var_path = "/devices/{deviceId}/shares/{shareId}".sub('{format}','json').sub('{' + 'deviceId' + '}', device_id.to_s).sub('{' + 'shareId' + '}', share_id.to_s)
|
104
104
|
|
105
105
|
# query parameters
|
106
106
|
query_params = {}
|
@@ -124,7 +124,7 @@ module ArtikCloud
|
|
124
124
|
:auth_names => auth_names,
|
125
125
|
:return_type => 'DeviceSharingId')
|
126
126
|
if @api_client.config.debugging
|
127
|
-
@api_client.config.logger.debug "API called:
|
127
|
+
@api_client.config.logger.debug "API called: DevicesSharesApi#delete_sharing_for_device\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
128
128
|
end
|
129
129
|
return data, status_code, headers
|
130
130
|
end
|
@@ -150,12 +150,12 @@ module ArtikCloud
|
|
150
150
|
# @return [Array<(DeviceSharingEnvelope, Fixnum, Hash)>] DeviceSharingEnvelope data, response status code and response headers
|
151
151
|
def get_all_shares_for_device_with_http_info(device_id, opts = {})
|
152
152
|
if @api_client.config.debugging
|
153
|
-
@api_client.config.logger.debug "Calling API:
|
153
|
+
@api_client.config.logger.debug "Calling API: DevicesSharesApi.get_all_shares_for_device ..."
|
154
154
|
end
|
155
155
|
# verify the required parameter 'device_id' is set
|
156
|
-
fail ArgumentError, "Missing the required parameter 'device_id' when calling
|
156
|
+
fail ArgumentError, "Missing the required parameter 'device_id' when calling DevicesSharesApi.get_all_shares_for_device" if device_id.nil?
|
157
157
|
# resource path
|
158
|
-
local_var_path = "
|
158
|
+
local_var_path = "/devices/{deviceId}/shares".sub('{format}','json').sub('{' + 'deviceId' + '}', device_id.to_s)
|
159
159
|
|
160
160
|
# query parameters
|
161
161
|
query_params = {}
|
@@ -181,7 +181,7 @@ module ArtikCloud
|
|
181
181
|
:auth_names => auth_names,
|
182
182
|
:return_type => 'DeviceSharingEnvelope')
|
183
183
|
if @api_client.config.debugging
|
184
|
-
@api_client.config.logger.debug "API called:
|
184
|
+
@api_client.config.logger.debug "API called: DevicesSharesApi#get_all_shares_for_device\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
185
185
|
end
|
186
186
|
return data, status_code, headers
|
187
187
|
end
|
@@ -205,14 +205,14 @@ module ArtikCloud
|
|
205
205
|
# @return [Array<(DeviceSharing, Fixnum, Hash)>] DeviceSharing data, response status code and response headers
|
206
206
|
def get_sharing_for_device_with_http_info(device_id, share_id, opts = {})
|
207
207
|
if @api_client.config.debugging
|
208
|
-
@api_client.config.logger.debug "Calling API:
|
208
|
+
@api_client.config.logger.debug "Calling API: DevicesSharesApi.get_sharing_for_device ..."
|
209
209
|
end
|
210
210
|
# verify the required parameter 'device_id' is set
|
211
|
-
fail ArgumentError, "Missing the required parameter 'device_id' when calling
|
211
|
+
fail ArgumentError, "Missing the required parameter 'device_id' when calling DevicesSharesApi.get_sharing_for_device" if device_id.nil?
|
212
212
|
# verify the required parameter 'share_id' is set
|
213
|
-
fail ArgumentError, "Missing the required parameter 'share_id' when calling
|
213
|
+
fail ArgumentError, "Missing the required parameter 'share_id' when calling DevicesSharesApi.get_sharing_for_device" if share_id.nil?
|
214
214
|
# resource path
|
215
|
-
local_var_path = "
|
215
|
+
local_var_path = "/devices/{deviceId}/shares/{shareId}".sub('{format}','json').sub('{' + 'deviceId' + '}', device_id.to_s).sub('{' + 'shareId' + '}', share_id.to_s)
|
216
216
|
|
217
217
|
# query parameters
|
218
218
|
query_params = {}
|
@@ -236,7 +236,7 @@ module ArtikCloud
|
|
236
236
|
:auth_names => auth_names,
|
237
237
|
:return_type => 'DeviceSharing')
|
238
238
|
if @api_client.config.debugging
|
239
|
-
@api_client.config.logger.debug "API called:
|
239
|
+
@api_client.config.logger.debug "API called: DevicesSharesApi#get_sharing_for_device\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
240
240
|
end
|
241
241
|
return data, status_code, headers
|
242
242
|
end
|
@@ -12,7 +12,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
12
12
|
require "uri"
|
13
13
|
|
14
14
|
module ArtikCloud
|
15
|
-
class
|
15
|
+
class DevicesStatusApi
|
16
16
|
attr_accessor :api_client
|
17
17
|
|
18
18
|
def initialize(api_client = ApiClient.default)
|
@@ -40,10 +40,10 @@ module ArtikCloud
|
|
40
40
|
# @return [Array<(DeviceStatus, Fixnum, Hash)>] DeviceStatus data, response status code and response headers
|
41
41
|
def get_device_status_with_http_info(device_id, opts = {})
|
42
42
|
if @api_client.config.debugging
|
43
|
-
@api_client.config.logger.debug "Calling API:
|
43
|
+
@api_client.config.logger.debug "Calling API: DevicesStatusApi.get_device_status ..."
|
44
44
|
end
|
45
45
|
# verify the required parameter 'device_id' is set
|
46
|
-
fail ArgumentError, "Missing the required parameter 'device_id' when calling
|
46
|
+
fail ArgumentError, "Missing the required parameter 'device_id' when calling DevicesStatusApi.get_device_status" if device_id.nil?
|
47
47
|
# resource path
|
48
48
|
local_var_path = "/devices/{deviceId}/status".sub('{format}','json').sub('{' + 'deviceId' + '}', device_id.to_s)
|
49
49
|
|
@@ -71,7 +71,7 @@ module ArtikCloud
|
|
71
71
|
:auth_names => auth_names,
|
72
72
|
:return_type => 'DeviceStatus')
|
73
73
|
if @api_client.config.debugging
|
74
|
-
@api_client.config.logger.debug "API called:
|
74
|
+
@api_client.config.logger.debug "API called: DevicesStatusApi#get_device_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
75
75
|
end
|
76
76
|
return data, status_code, headers
|
77
77
|
end
|
@@ -97,10 +97,10 @@ module ArtikCloud
|
|
97
97
|
# @return [Array<(DeviceStatusBatch, Fixnum, Hash)>] DeviceStatusBatch data, response status code and response headers
|
98
98
|
def get_devices_status_with_http_info(dids, opts = {})
|
99
99
|
if @api_client.config.debugging
|
100
|
-
@api_client.config.logger.debug "Calling API:
|
100
|
+
@api_client.config.logger.debug "Calling API: DevicesStatusApi.get_devices_status ..."
|
101
101
|
end
|
102
102
|
# verify the required parameter 'dids' is set
|
103
|
-
fail ArgumentError, "Missing the required parameter 'dids' when calling
|
103
|
+
fail ArgumentError, "Missing the required parameter 'dids' when calling DevicesStatusApi.get_devices_status" if dids.nil?
|
104
104
|
# resource path
|
105
105
|
local_var_path = "/devices/status".sub('{format}','json')
|
106
106
|
|
@@ -129,7 +129,7 @@ module ArtikCloud
|
|
129
129
|
:auth_names => auth_names,
|
130
130
|
:return_type => 'DeviceStatusBatch')
|
131
131
|
if @api_client.config.debugging
|
132
|
-
@api_client.config.logger.debug "API called:
|
132
|
+
@api_client.config.logger.debug "API called: DevicesStatusApi#get_devices_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
133
133
|
end
|
134
134
|
return data, status_code, headers
|
135
135
|
end
|
@@ -153,10 +153,10 @@ module ArtikCloud
|
|
153
153
|
# @return [Array<(DeviceStatus, Fixnum, Hash)>] DeviceStatus data, response status code and response headers
|
154
154
|
def put_device_status_with_http_info(device_id, opts = {})
|
155
155
|
if @api_client.config.debugging
|
156
|
-
@api_client.config.logger.debug "Calling API:
|
156
|
+
@api_client.config.logger.debug "Calling API: DevicesStatusApi.put_device_status ..."
|
157
157
|
end
|
158
158
|
# verify the required parameter 'device_id' is set
|
159
|
-
fail ArgumentError, "Missing the required parameter 'device_id' when calling
|
159
|
+
fail ArgumentError, "Missing the required parameter 'device_id' when calling DevicesStatusApi.put_device_status" if device_id.nil?
|
160
160
|
# resource path
|
161
161
|
local_var_path = "/devices/{deviceId}/status".sub('{format}','json').sub('{' + 'deviceId' + '}', device_id.to_s)
|
162
162
|
|
@@ -182,7 +182,7 @@ module ArtikCloud
|
|
182
182
|
:auth_names => auth_names,
|
183
183
|
:return_type => 'DeviceStatus')
|
184
184
|
if @api_client.config.debugging
|
185
|
-
@api_client.config.logger.debug "API called:
|
185
|
+
@api_client.config.logger.debug "API called: DevicesStatusApi#put_device_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
186
186
|
end
|
187
187
|
return data, status_code, headers
|
188
188
|
end
|
@@ -367,6 +367,7 @@ module ArtikCloud
|
|
367
367
|
# @option opts [BOOLEAN] :exclude_disabled Exclude disabled rules in the result.
|
368
368
|
# @option opts [Integer] :count Desired count of items in the result set.
|
369
369
|
# @option opts [Integer] :offset Offset for pagination.
|
370
|
+
# @option opts [String] :owner Rule owner
|
370
371
|
# @return [RulesEnvelope]
|
371
372
|
def get_user_rules(user_id, opts = {})
|
372
373
|
data, _status_code, _headers = get_user_rules_with_http_info(user_id, opts)
|
@@ -380,6 +381,7 @@ module ArtikCloud
|
|
380
381
|
# @option opts [BOOLEAN] :exclude_disabled Exclude disabled rules in the result.
|
381
382
|
# @option opts [Integer] :count Desired count of items in the result set.
|
382
383
|
# @option opts [Integer] :offset Offset for pagination.
|
384
|
+
# @option opts [String] :owner Rule owner
|
383
385
|
# @return [Array<(RulesEnvelope, Fixnum, Hash)>] RulesEnvelope data, response status code and response headers
|
384
386
|
def get_user_rules_with_http_info(user_id, opts = {})
|
385
387
|
if @api_client.config.debugging
|
@@ -387,6 +389,9 @@ module ArtikCloud
|
|
387
389
|
end
|
388
390
|
# verify the required parameter 'user_id' is set
|
389
391
|
fail ArgumentError, "Missing the required parameter 'user_id' when calling UsersApi.get_user_rules" if user_id.nil?
|
392
|
+
if opts[:'owner'] && !['user', 'application', 'all'].include?(opts[:'owner'])
|
393
|
+
fail ArgumentError, 'invalid value for "owner", must be one of user, application, all'
|
394
|
+
end
|
390
395
|
# resource path
|
391
396
|
local_var_path = "/users/{userId}/rules".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)
|
392
397
|
|
@@ -395,6 +400,7 @@ module ArtikCloud
|
|
395
400
|
query_params[:'excludeDisabled'] = opts[:'exclude_disabled'] if !opts[:'exclude_disabled'].nil?
|
396
401
|
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
397
402
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
403
|
+
query_params[:'owner'] = opts[:'owner'] if !opts[:'owner'].nil?
|
398
404
|
|
399
405
|
# header parameters
|
400
406
|
header_params = {}
|
@@ -450,7 +456,7 @@ module ArtikCloud
|
|
450
456
|
# verify the required parameter 'filter' is set
|
451
457
|
fail ArgumentError, "Missing the required parameter 'filter' when calling UsersApi.list_all_shares_for_user" if filter.nil?
|
452
458
|
# resource path
|
453
|
-
local_var_path = "
|
459
|
+
local_var_path = "/users/{userId}/shares".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)
|
454
460
|
|
455
461
|
# query parameters
|
456
462
|
query_params = {}
|
Binary file
|
@@ -15,20 +15,20 @@ module ArtikCloud
|
|
15
15
|
#
|
16
16
|
class DeviceShareInfo
|
17
17
|
# User email
|
18
|
-
attr_accessor :
|
18
|
+
attr_accessor :email
|
19
19
|
|
20
20
|
|
21
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
22
|
def self.attribute_map
|
23
23
|
{
|
24
|
-
:'
|
24
|
+
:'email' => :'email'
|
25
25
|
}
|
26
26
|
end
|
27
27
|
|
28
28
|
# Attribute type mapping.
|
29
29
|
def self.swagger_types
|
30
30
|
{
|
31
|
-
:'
|
31
|
+
:'email' => :'String'
|
32
32
|
}
|
33
33
|
end
|
34
34
|
|
@@ -40,8 +40,8 @@ module ArtikCloud
|
|
40
40
|
# convert string to symbol for hash key
|
41
41
|
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
42
42
|
|
43
|
-
if attributes.has_key?(:'
|
44
|
-
self.
|
43
|
+
if attributes.has_key?(:'email')
|
44
|
+
self.email = attributes[:'email']
|
45
45
|
end
|
46
46
|
|
47
47
|
end
|
@@ -64,7 +64,7 @@ module ArtikCloud
|
|
64
64
|
def ==(o)
|
65
65
|
return true if self.equal?(o)
|
66
66
|
self.class == o.class &&
|
67
|
-
|
67
|
+
email == o.email
|
68
68
|
end
|
69
69
|
|
70
70
|
# @see the `==` method
|
@@ -76,7 +76,7 @@ module ArtikCloud
|
|
76
76
|
# Calculates hash code according to all attributes.
|
77
77
|
# @return [Fixnum] Hash code
|
78
78
|
def hash
|
79
|
-
[
|
79
|
+
[email].hash
|
80
80
|
end
|
81
81
|
|
82
82
|
# Builds the object from hash
|
data/lib/artikcloud/version.rb
CHANGED
@@ -1,14 +1,10 @@
|
|
1
1
|
=begin
|
2
2
|
#ARTIK Cloud API
|
3
3
|
|
4
|
-
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
-
|
6
4
|
OpenAPI spec version: 2.0.0
|
7
5
|
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
|
10
6
|
=end
|
11
7
|
|
12
8
|
module ArtikCloud
|
13
|
-
VERSION = "2.1.
|
9
|
+
VERSION = "2.1.1"
|
14
10
|
end
|
data/lib/artikcloud.rb
CHANGED
@@ -162,8 +162,8 @@ require 'artikcloud/models/web_socket_error'
|
|
162
162
|
require 'artikcloud/api/device_types_api'
|
163
163
|
require 'artikcloud/api/devices_api'
|
164
164
|
require 'artikcloud/api/devices_management_api'
|
165
|
-
require 'artikcloud/api/
|
166
|
-
require 'artikcloud/api/
|
165
|
+
require 'artikcloud/api/devices_shares_api'
|
166
|
+
require 'artikcloud/api/devices_status_api'
|
167
167
|
require 'artikcloud/api/export_api'
|
168
168
|
require 'artikcloud/api/messages_api'
|
169
169
|
require 'artikcloud/api/registrations_api'
|
data/pom.xml
CHANGED
data/spec/.DS_Store
ADDED
Binary file
|
data/spec/api/.DS_Store
ADDED
Binary file
|
@@ -38,7 +38,7 @@ describe 'DeviceTypesApi' do
|
|
38
38
|
end
|
39
39
|
|
40
40
|
describe 'test an instance of DeviceTypesApi' do
|
41
|
-
it 'should create an
|
41
|
+
it 'should create an instance of DeviceTypesApi' do
|
42
42
|
# expect(@instance).to be_instance_of(ArtikCloud::DeviceTypesApi)
|
43
43
|
end
|
44
44
|
end
|
@@ -28,10 +28,17 @@ require 'json'
|
|
28
28
|
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
29
29
|
# Please update as you see appropriate
|
30
30
|
describe 'DevicesApi', :vcr do
|
31
|
+
before do
|
32
|
+
# run before each test
|
31
33
|
let(:instance) { ArtikCloud::DevicesApi.new(API_CLIENT) }
|
34
|
+
end
|
35
|
+
|
36
|
+
after do
|
37
|
+
# run after each test
|
38
|
+
end
|
32
39
|
|
33
40
|
describe 'test an instance of DevicesApi' do
|
34
|
-
it 'should create an
|
41
|
+
it 'should create an instance of DevicesApi' do
|
35
42
|
# expect(@instance).to be_instance_of(ArtikCloud::DevicesApi)
|
36
43
|
end
|
37
44
|
end
|
@@ -12,22 +12,22 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
12
12
|
require 'spec_helper'
|
13
13
|
require 'json'
|
14
14
|
|
15
|
-
# Unit tests for ArtikCloud::
|
15
|
+
# Unit tests for ArtikCloud::DevicesSharesApi
|
16
16
|
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
17
17
|
# Please update as you see appropriate
|
18
|
-
describe '
|
18
|
+
describe 'DevicesSharesApi' do
|
19
19
|
before do
|
20
20
|
# run before each test
|
21
|
-
@instance = ArtikCloud::
|
21
|
+
@instance = ArtikCloud::DevicesSharesApi.new
|
22
22
|
end
|
23
23
|
|
24
24
|
after do
|
25
25
|
# run after each test
|
26
26
|
end
|
27
27
|
|
28
|
-
describe 'test an instance of
|
29
|
-
it 'should create an instact of
|
30
|
-
expect(@instance).to be_instance_of(ArtikCloud::
|
28
|
+
describe 'test an instance of DevicesSharesApi' do
|
29
|
+
it 'should create an instact of DevicesSharesApi' do
|
30
|
+
expect(@instance).to be_instance_of(ArtikCloud::DevicesSharesApi)
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
@@ -12,22 +12,22 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
12
12
|
require 'spec_helper'
|
13
13
|
require 'json'
|
14
14
|
|
15
|
-
# Unit tests for ArtikCloud::
|
15
|
+
# Unit tests for ArtikCloud::DevicesStatusApi
|
16
16
|
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
17
17
|
# Please update as you see appropriate
|
18
|
-
describe '
|
18
|
+
describe 'DevicesStatusApi' do
|
19
19
|
before do
|
20
20
|
# run before each test
|
21
|
-
@instance = ArtikCloud::
|
21
|
+
@instance = ArtikCloud::DevicesStatusApi.new
|
22
22
|
end
|
23
23
|
|
24
24
|
after do
|
25
25
|
# run after each test
|
26
26
|
end
|
27
27
|
|
28
|
-
describe 'test an instance of
|
29
|
-
it 'should create an instact of
|
30
|
-
expect(@instance).to be_instance_of(ArtikCloud::
|
28
|
+
describe 'test an instance of DevicesStatusApi' do
|
29
|
+
it 'should create an instact of DevicesStatusApi' do
|
30
|
+
expect(@instance).to be_instance_of(ArtikCloud::DevicesStatusApi)
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
data/spec/api/export_api_spec.rb
CHANGED
@@ -38,8 +38,8 @@ describe 'ExportApi' do
|
|
38
38
|
end
|
39
39
|
|
40
40
|
describe 'test an instance of ExportApi' do
|
41
|
-
it 'should create an
|
42
|
-
|
41
|
+
it 'should create an instance of ExportApi' do
|
42
|
+
expect(@instance).to be_instance_of(ArtikCloud::ExportApi)
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
@@ -18,23 +18,33 @@ require 'json'
|
|
18
18
|
# Unit tests for ArtikCloud::MessagesApi
|
19
19
|
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
20
20
|
# Please update as you see appropriate
|
21
|
-
describe 'MessagesApi'
|
22
|
-
|
23
|
-
|
21
|
+
describe 'MessagesApi' do
|
22
|
+
before do
|
23
|
+
# run before each test
|
24
|
+
@instance = ArtikCloud::MessagesApi.new
|
25
|
+
end
|
26
|
+
|
27
|
+
after do
|
28
|
+
# run after each test
|
29
|
+
end
|
24
30
|
|
25
31
|
describe 'test an instance of MessagesApi' do
|
26
32
|
it 'should create an instact of MessagesApi' do
|
27
|
-
expect(instance).to
|
33
|
+
expect(@instance).to be_instance_of(ArtikCloud::MessagesApi)
|
28
34
|
end
|
29
35
|
end
|
30
36
|
|
31
|
-
# unit tests for
|
32
|
-
#
|
33
|
-
#
|
34
|
-
# @param
|
37
|
+
# unit tests for get_aggregates_histogram
|
38
|
+
# Get Normalized Message Histogram
|
39
|
+
# Get Histogram on normalized messages.
|
40
|
+
# @param start_date Timestamp of earliest message (in milliseconds since epoch).
|
41
|
+
# @param end_date Timestamp of latest message (in milliseconds since epoch).
|
35
42
|
# @param [Hash] opts the optional parameters
|
36
|
-
# @
|
37
|
-
|
43
|
+
# @option opts [String] :sdid Source device ID of the messages being searched.
|
44
|
+
# @option opts [String] :field Message field being queried for building histogram.
|
45
|
+
# @option opts [String] :interval Interval of time for building histogram blocks. (Valid values: minute, hour, day, month, year)
|
46
|
+
# @return [AggregatesHistogramResponse]
|
47
|
+
describe 'get_aggregates_histogram test' do
|
38
48
|
it "should work" do
|
39
49
|
message = ArtikCloud::Message.new
|
40
50
|
message.type = "message"
|
@@ -39,7 +39,7 @@ describe 'RegistrationsApi' do
|
|
39
39
|
|
40
40
|
describe 'test an instance of RegistrationsApi' do
|
41
41
|
it 'should create an instact of RegistrationsApi' do
|
42
|
-
|
42
|
+
expect(@instance).to be_instance_of(ArtikCloud::RegistrationsApi)
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
data/spec/api/rules_api_spec.rb
CHANGED