artikcloud 2.0.0 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +12 -12
- data/README.md +33 -10
- data/artikcloud.gemspec +5 -6
- data/docs/Action.md +9 -0
- data/docs/ActionArray.md +8 -0
- data/docs/Actions.md +12 -0
- data/docs/DeviceTypesApi.md +10 -10
- data/docs/DevicesApi.md +68 -15
- data/docs/ExportApi.md +10 -10
- data/docs/Message.md +11 -0
- data/docs/MessagesApi.md +205 -27
- data/docs/NormalizedAction.md +16 -0
- data/docs/NormalizedActionsEnvelope.md +17 -0
- data/docs/PresenceEnvelope.md +9 -0
- data/docs/PresenceModel.md +9 -0
- data/docs/RegistrationsApi.md +6 -6
- data/docs/RulesApi.md +8 -8
- data/docs/RulesEnvelope.md +1 -1
- data/docs/SnapshotResponse.md +9 -0
- data/docs/SnapshotResponses.md +10 -0
- data/docs/SnapshotsResponseEnvelope.md +9 -0
- data/docs/TagsApi.md +7 -7
- data/docs/TokenInfo.md +11 -0
- data/docs/TokenInfoSuccessResponse.md +8 -0
- data/docs/TokensApi.md +54 -7
- data/docs/UsersApi.md +18 -20
- data/git_push.sh +16 -1
- data/lib/artikcloud/api/device_types_api.rb +52 -59
- data/lib/artikcloud/api/devices_api.rb +120 -76
- data/lib/artikcloud/api/export_api.rb +43 -45
- data/lib/artikcloud/api/messages_api.rb +285 -103
- data/lib/artikcloud/api/registrations_api.rb +34 -34
- data/lib/artikcloud/api/rules_api.rb +43 -48
- data/lib/artikcloud/api/tags_api.rb +37 -35
- data/lib/artikcloud/api/tokens_api.rb +85 -30
- data/lib/artikcloud/api/users_api.rb +83 -102
- data/lib/artikcloud/api_client.rb +56 -13
- data/lib/artikcloud/api_error.rb +13 -4
- data/lib/artikcloud/configuration.rb +45 -1
- data/lib/artikcloud/models/ack_envelope.rb +59 -24
- data/lib/artikcloud/models/acknowledgement.rb +65 -33
- data/lib/artikcloud/models/action.rb +212 -0
- data/lib/artikcloud/models/action_array.rb +201 -0
- data/lib/artikcloud/models/action_details.rb +61 -27
- data/lib/artikcloud/models/action_details_array.rb +59 -24
- data/lib/artikcloud/models/action_in.rb +69 -39
- data/lib/artikcloud/models/action_out.rb +67 -36
- data/lib/artikcloud/models/actions.rb +241 -0
- data/lib/artikcloud/models/aggregate_data.rb +69 -39
- data/lib/artikcloud/models/aggregates_histogram_data.rb +71 -42
- data/lib/artikcloud/models/aggregates_histogram_response.rb +71 -42
- data/lib/artikcloud/models/aggregates_response.rb +69 -39
- data/lib/artikcloud/models/app_properties.rb +64 -30
- data/lib/artikcloud/models/check_token_message.rb +59 -24
- data/lib/artikcloud/models/check_token_response.rb +59 -24
- data/lib/artikcloud/models/device.rb +85 -63
- data/lib/artikcloud/models/device_array.rb +59 -24
- data/lib/artikcloud/models/device_envelope.rb +60 -24
- data/lib/artikcloud/models/device_reg_complete_request.rb +59 -24
- data/lib/artikcloud/models/device_reg_confirm_user_request.rb +63 -30
- data/lib/artikcloud/models/device_reg_confirm_user_response.rb +59 -24
- data/lib/artikcloud/models/device_reg_confirm_user_response_envelope.rb +59 -24
- data/lib/artikcloud/models/device_reg_status_response.rb +61 -27
- data/lib/artikcloud/models/device_reg_status_response_envelope.rb +59 -24
- data/lib/artikcloud/models/device_token.rb +69 -33
- data/lib/artikcloud/models/device_token_envelope.rb +60 -24
- data/lib/artikcloud/models/device_type.rb +93 -75
- data/lib/artikcloud/models/device_type_array.rb +59 -24
- data/lib/artikcloud/models/device_type_envelope.rb +60 -24
- data/lib/artikcloud/models/device_types_envelope.rb +68 -33
- data/lib/artikcloud/models/devices_envelope.rb +68 -33
- data/lib/artikcloud/models/error_envelope.rb +59 -24
- data/lib/artikcloud/models/export_data.rb +71 -42
- data/lib/artikcloud/models/export_data_array.rb +59 -24
- data/lib/artikcloud/models/export_history_response.rb +65 -33
- data/lib/artikcloud/models/export_normalized_messages_response.rb +83 -60
- data/lib/artikcloud/models/export_request.rb +73 -45
- data/lib/artikcloud/models/export_request_data.rb +79 -54
- data/lib/artikcloud/models/export_request_info.rb +77 -51
- data/lib/artikcloud/models/export_request_response.rb +59 -24
- data/lib/artikcloud/models/export_response.rb +79 -54
- data/lib/artikcloud/models/export_status_response.rb +67 -36
- data/lib/artikcloud/models/field_path.rb +59 -24
- data/lib/artikcloud/models/field_presence.rb +60 -24
- data/lib/artikcloud/models/field_presence_envelope.rb +78 -42
- data/lib/artikcloud/models/fields_actions.rb +61 -27
- data/lib/artikcloud/models/manifest_properties.rb +60 -24
- data/lib/artikcloud/models/manifest_properties_envelope.rb +60 -24
- data/lib/artikcloud/models/manifest_versions.rb +60 -24
- data/lib/artikcloud/models/manifest_versions_envelope.rb +60 -24
- data/lib/artikcloud/models/message.rb +233 -0
- data/lib/artikcloud/models/message_action.rb +67 -36
- data/lib/artikcloud/models/message_id.rb +59 -24
- data/lib/artikcloud/models/message_id_envelope.rb +59 -24
- data/lib/artikcloud/models/message_in.rb +69 -39
- data/lib/artikcloud/models/message_out.rb +67 -36
- data/lib/artikcloud/models/non_empty_string.rb +59 -24
- data/lib/artikcloud/models/normalized_action.rb +279 -0
- data/lib/artikcloud/models/normalized_actions_envelope.rb +285 -0
- data/lib/artikcloud/models/normalized_message.rb +81 -45
- data/lib/artikcloud/models/normalized_messages_envelope.rb +80 -51
- data/lib/artikcloud/models/output_rule.rb +85 -63
- data/lib/artikcloud/models/presence_envelope.rb +208 -0
- data/lib/artikcloud/models/presence_model.rb +208 -0
- data/lib/artikcloud/models/properties_envelope.rb +60 -24
- data/lib/artikcloud/models/refresh_token_response.rb +65 -33
- data/lib/artikcloud/models/register_message.rb +67 -36
- data/lib/artikcloud/models/rule_array.rb +59 -24
- data/lib/artikcloud/models/rule_creation_info.rb +65 -33
- data/lib/artikcloud/models/rule_envelope.rb +59 -24
- data/lib/artikcloud/models/rule_error.rb +65 -33
- data/lib/artikcloud/models/rule_update_info.rb +65 -33
- data/lib/artikcloud/models/rule_warning_output.rb +61 -27
- data/lib/artikcloud/models/rules_envelope.rb +69 -35
- data/lib/artikcloud/models/snapshot_response.rb +210 -0
- data/lib/artikcloud/models/snapshot_responses.rb +219 -0
- data/lib/artikcloud/models/snapshots_response_envelope.rb +208 -0
- data/lib/artikcloud/models/tag.rb +61 -27
- data/lib/artikcloud/models/tag_array.rb +59 -24
- data/lib/artikcloud/models/tags_envelope.rb +59 -24
- data/lib/artikcloud/models/token.rb +65 -33
- data/lib/artikcloud/models/token_info.rb +226 -0
- data/lib/artikcloud/models/token_info_success_response.rb +199 -0
- data/lib/artikcloud/models/token_request.rb +59 -24
- data/lib/artikcloud/models/token_response.rb +59 -24
- data/lib/artikcloud/models/unregister_device_response.rb +79 -54
- data/lib/artikcloud/models/unregister_device_response_envelope.rb +59 -24
- data/lib/artikcloud/models/user.rb +77 -42
- data/lib/artikcloud/models/user_envelope.rb +60 -24
- data/lib/artikcloud/models/web_socket_error.rb +63 -30
- data/lib/artikcloud/version.rb +14 -5
- data/lib/artikcloud.rb +26 -4
- data/spec/api/device_types_api_spec.rb +110 -0
- data/spec/api/devices_api_spec.rb +143 -0
- data/spec/api/export_api_spec.rb +96 -0
- data/spec/api/messages_api_spec.rb +7 -7
- data/spec/api/registrations_api_spec.rb +82 -0
- data/spec/api/rules_api_spec.rb +96 -0
- data/spec/api/tags_api_spec.rb +84 -0
- data/spec/api/tokens_api_spec.rb +12 -21
- data/spec/api/users_api_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +60 -22
@@ -1,14 +1,23 @@
|
|
1
1
|
=begin
|
2
|
-
ARTIK Cloud API
|
2
|
+
#ARTIK Cloud API
|
3
|
+
|
4
|
+
#No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
3
5
|
|
4
6
|
OpenAPI spec version: 2.0.0
|
5
7
|
|
6
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
7
9
|
|
8
|
-
License
|
9
|
-
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
15
|
|
11
|
-
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
12
21
|
|
13
22
|
=end
|
14
23
|
|
@@ -28,7 +37,7 @@ module ArtikCloud
|
|
28
37
|
# @param [Hash] opts the optional parameters
|
29
38
|
# @return [DeviceEnvelope]
|
30
39
|
def add_device(device, opts = {})
|
31
|
-
data,
|
40
|
+
data, _status_code, _headers = add_device_with_http_info(device, opts)
|
32
41
|
return data
|
33
42
|
end
|
34
43
|
|
@@ -39,12 +48,10 @@ module ArtikCloud
|
|
39
48
|
# @return [Array<(DeviceEnvelope, Fixnum, Hash)>] DeviceEnvelope data, response status code and response headers
|
40
49
|
def add_device_with_http_info(device, opts = {})
|
41
50
|
if @api_client.config.debugging
|
42
|
-
@api_client.config.logger.debug "Calling API: DevicesApi
|
51
|
+
@api_client.config.logger.debug "Calling API: DevicesApi.add_device ..."
|
43
52
|
end
|
44
|
-
|
45
53
|
# verify the required parameter 'device' is set
|
46
|
-
fail "Missing the required parameter 'device' when calling add_device" if device.nil?
|
47
|
-
|
54
|
+
fail ArgumentError, "Missing the required parameter 'device' when calling DevicesApi.add_device" if device.nil?
|
48
55
|
# resource path
|
49
56
|
local_var_path = "/devices".sub('{format}','json')
|
50
57
|
|
@@ -55,19 +62,18 @@ module ArtikCloud
|
|
55
62
|
header_params = {}
|
56
63
|
|
57
64
|
# HTTP header 'Accept' (if needed)
|
58
|
-
|
59
|
-
|
65
|
+
local_header_accept = ['application/json']
|
66
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
60
67
|
|
61
68
|
# HTTP header 'Content-Type'
|
62
|
-
|
63
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
69
|
+
local_header_content_type = ['application/json']
|
70
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
64
71
|
|
65
72
|
# form parameters
|
66
73
|
form_params = {}
|
67
74
|
|
68
75
|
# http body (model)
|
69
76
|
post_body = @api_client.object_to_http_body(device)
|
70
|
-
|
71
77
|
auth_names = ['artikcloud_oauth']
|
72
78
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
73
79
|
:header_params => header_params,
|
@@ -88,7 +94,7 @@ module ArtikCloud
|
|
88
94
|
# @param [Hash] opts the optional parameters
|
89
95
|
# @return [DeviceEnvelope]
|
90
96
|
def delete_device(device_id, opts = {})
|
91
|
-
data,
|
97
|
+
data, _status_code, _headers = delete_device_with_http_info(device_id, opts)
|
92
98
|
return data
|
93
99
|
end
|
94
100
|
|
@@ -99,12 +105,10 @@ module ArtikCloud
|
|
99
105
|
# @return [Array<(DeviceEnvelope, Fixnum, Hash)>] DeviceEnvelope data, response status code and response headers
|
100
106
|
def delete_device_with_http_info(device_id, opts = {})
|
101
107
|
if @api_client.config.debugging
|
102
|
-
@api_client.config.logger.debug "Calling API: DevicesApi
|
108
|
+
@api_client.config.logger.debug "Calling API: DevicesApi.delete_device ..."
|
103
109
|
end
|
104
|
-
|
105
110
|
# verify the required parameter 'device_id' is set
|
106
|
-
fail "Missing the required parameter 'device_id' when calling delete_device" if device_id.nil?
|
107
|
-
|
111
|
+
fail ArgumentError, "Missing the required parameter 'device_id' when calling DevicesApi.delete_device" if device_id.nil?
|
108
112
|
# resource path
|
109
113
|
local_var_path = "/devices/{deviceId}".sub('{format}','json').sub('{' + 'deviceId' + '}', device_id.to_s)
|
110
114
|
|
@@ -115,19 +119,18 @@ module ArtikCloud
|
|
115
119
|
header_params = {}
|
116
120
|
|
117
121
|
# HTTP header 'Accept' (if needed)
|
118
|
-
|
119
|
-
|
122
|
+
local_header_accept = ['application/json']
|
123
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
120
124
|
|
121
125
|
# HTTP header 'Content-Type'
|
122
|
-
|
123
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
126
|
+
local_header_content_type = []
|
127
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
124
128
|
|
125
129
|
# form parameters
|
126
130
|
form_params = {}
|
127
131
|
|
128
132
|
# http body (model)
|
129
133
|
post_body = nil
|
130
|
-
|
131
134
|
auth_names = ['artikcloud_oauth']
|
132
135
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
133
136
|
:header_params => header_params,
|
@@ -148,7 +151,7 @@ module ArtikCloud
|
|
148
151
|
# @param [Hash] opts the optional parameters
|
149
152
|
# @return [DeviceTokenEnvelope]
|
150
153
|
def delete_device_token(device_id, opts = {})
|
151
|
-
data,
|
154
|
+
data, _status_code, _headers = delete_device_token_with_http_info(device_id, opts)
|
152
155
|
return data
|
153
156
|
end
|
154
157
|
|
@@ -159,12 +162,10 @@ module ArtikCloud
|
|
159
162
|
# @return [Array<(DeviceTokenEnvelope, Fixnum, Hash)>] DeviceTokenEnvelope data, response status code and response headers
|
160
163
|
def delete_device_token_with_http_info(device_id, opts = {})
|
161
164
|
if @api_client.config.debugging
|
162
|
-
@api_client.config.logger.debug "Calling API: DevicesApi
|
165
|
+
@api_client.config.logger.debug "Calling API: DevicesApi.delete_device_token ..."
|
163
166
|
end
|
164
|
-
|
165
167
|
# verify the required parameter 'device_id' is set
|
166
|
-
fail "Missing the required parameter 'device_id' when calling delete_device_token" if device_id.nil?
|
167
|
-
|
168
|
+
fail ArgumentError, "Missing the required parameter 'device_id' when calling DevicesApi.delete_device_token" if device_id.nil?
|
168
169
|
# resource path
|
169
170
|
local_var_path = "/devices/{deviceId}/tokens".sub('{format}','json').sub('{' + 'deviceId' + '}', device_id.to_s)
|
170
171
|
|
@@ -175,19 +176,18 @@ module ArtikCloud
|
|
175
176
|
header_params = {}
|
176
177
|
|
177
178
|
# HTTP header 'Accept' (if needed)
|
178
|
-
|
179
|
-
|
179
|
+
local_header_accept = ['application/json']
|
180
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
180
181
|
|
181
182
|
# HTTP header 'Content-Type'
|
182
|
-
|
183
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
183
|
+
local_header_content_type = []
|
184
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
184
185
|
|
185
186
|
# form parameters
|
186
187
|
form_params = {}
|
187
188
|
|
188
189
|
# http body (model)
|
189
190
|
post_body = nil
|
190
|
-
|
191
191
|
auth_names = ['artikcloud_oauth']
|
192
192
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
193
193
|
:header_params => header_params,
|
@@ -208,7 +208,7 @@ module ArtikCloud
|
|
208
208
|
# @param [Hash] opts the optional parameters
|
209
209
|
# @return [DeviceEnvelope]
|
210
210
|
def get_device(device_id, opts = {})
|
211
|
-
data,
|
211
|
+
data, _status_code, _headers = get_device_with_http_info(device_id, opts)
|
212
212
|
return data
|
213
213
|
end
|
214
214
|
|
@@ -219,12 +219,10 @@ module ArtikCloud
|
|
219
219
|
# @return [Array<(DeviceEnvelope, Fixnum, Hash)>] DeviceEnvelope data, response status code and response headers
|
220
220
|
def get_device_with_http_info(device_id, opts = {})
|
221
221
|
if @api_client.config.debugging
|
222
|
-
@api_client.config.logger.debug "Calling API: DevicesApi
|
222
|
+
@api_client.config.logger.debug "Calling API: DevicesApi.get_device ..."
|
223
223
|
end
|
224
|
-
|
225
224
|
# verify the required parameter 'device_id' is set
|
226
|
-
fail "Missing the required parameter 'device_id' when calling get_device" if device_id.nil?
|
227
|
-
|
225
|
+
fail ArgumentError, "Missing the required parameter 'device_id' when calling DevicesApi.get_device" if device_id.nil?
|
228
226
|
# resource path
|
229
227
|
local_var_path = "/devices/{deviceId}".sub('{format}','json').sub('{' + 'deviceId' + '}', device_id.to_s)
|
230
228
|
|
@@ -235,19 +233,18 @@ module ArtikCloud
|
|
235
233
|
header_params = {}
|
236
234
|
|
237
235
|
# HTTP header 'Accept' (if needed)
|
238
|
-
|
239
|
-
|
236
|
+
local_header_accept = ['application/json']
|
237
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
240
238
|
|
241
239
|
# HTTP header 'Content-Type'
|
242
|
-
|
243
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
240
|
+
local_header_content_type = []
|
241
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
244
242
|
|
245
243
|
# form parameters
|
246
244
|
form_params = {}
|
247
245
|
|
248
246
|
# http body (model)
|
249
247
|
post_body = nil
|
250
|
-
|
251
248
|
auth_names = ['artikcloud_oauth']
|
252
249
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
253
250
|
:header_params => header_params,
|
@@ -262,13 +259,70 @@ module ArtikCloud
|
|
262
259
|
return data, status_code, headers
|
263
260
|
end
|
264
261
|
|
262
|
+
# Get device presence information
|
263
|
+
# Return the presence status of the given device along with the time it was last seen
|
264
|
+
# @param device_id Device ID.
|
265
|
+
# @param [Hash] opts the optional parameters
|
266
|
+
# @return [PresenceEnvelope]
|
267
|
+
def get_device_presence(device_id, opts = {})
|
268
|
+
data, _status_code, _headers = get_device_presence_with_http_info(device_id, opts)
|
269
|
+
return data
|
270
|
+
end
|
271
|
+
|
272
|
+
# Get device presence information
|
273
|
+
# Return the presence status of the given device along with the time it was last seen
|
274
|
+
# @param device_id Device ID.
|
275
|
+
# @param [Hash] opts the optional parameters
|
276
|
+
# @return [Array<(PresenceEnvelope, Fixnum, Hash)>] PresenceEnvelope data, response status code and response headers
|
277
|
+
def get_device_presence_with_http_info(device_id, opts = {})
|
278
|
+
if @api_client.config.debugging
|
279
|
+
@api_client.config.logger.debug "Calling API: DevicesApi.get_device_presence ..."
|
280
|
+
end
|
281
|
+
# verify the required parameter 'device_id' is set
|
282
|
+
fail ArgumentError, "Missing the required parameter 'device_id' when calling DevicesApi.get_device_presence" if device_id.nil?
|
283
|
+
# resource path
|
284
|
+
local_var_path = "/devices/{deviceId}/presence".sub('{format}','json').sub('{' + 'deviceId' + '}', device_id.to_s)
|
285
|
+
|
286
|
+
# query parameters
|
287
|
+
query_params = {}
|
288
|
+
|
289
|
+
# header parameters
|
290
|
+
header_params = {}
|
291
|
+
|
292
|
+
# HTTP header 'Accept' (if needed)
|
293
|
+
local_header_accept = ['application/json']
|
294
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
295
|
+
|
296
|
+
# HTTP header 'Content-Type'
|
297
|
+
local_header_content_type = []
|
298
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
299
|
+
|
300
|
+
# form parameters
|
301
|
+
form_params = {}
|
302
|
+
|
303
|
+
# http body (model)
|
304
|
+
post_body = nil
|
305
|
+
auth_names = ['artikcloud_oauth']
|
306
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
307
|
+
:header_params => header_params,
|
308
|
+
:query_params => query_params,
|
309
|
+
:form_params => form_params,
|
310
|
+
:body => post_body,
|
311
|
+
:auth_names => auth_names,
|
312
|
+
:return_type => 'PresenceEnvelope')
|
313
|
+
if @api_client.config.debugging
|
314
|
+
@api_client.config.logger.debug "API called: DevicesApi#get_device_presence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
315
|
+
end
|
316
|
+
return data, status_code, headers
|
317
|
+
end
|
318
|
+
|
265
319
|
# Get Device Token
|
266
320
|
# Retrieves a device's token
|
267
321
|
# @param device_id deviceId
|
268
322
|
# @param [Hash] opts the optional parameters
|
269
323
|
# @return [DeviceTokenEnvelope]
|
270
324
|
def get_device_token(device_id, opts = {})
|
271
|
-
data,
|
325
|
+
data, _status_code, _headers = get_device_token_with_http_info(device_id, opts)
|
272
326
|
return data
|
273
327
|
end
|
274
328
|
|
@@ -279,12 +333,10 @@ module ArtikCloud
|
|
279
333
|
# @return [Array<(DeviceTokenEnvelope, Fixnum, Hash)>] DeviceTokenEnvelope data, response status code and response headers
|
280
334
|
def get_device_token_with_http_info(device_id, opts = {})
|
281
335
|
if @api_client.config.debugging
|
282
|
-
@api_client.config.logger.debug "Calling API: DevicesApi
|
336
|
+
@api_client.config.logger.debug "Calling API: DevicesApi.get_device_token ..."
|
283
337
|
end
|
284
|
-
|
285
338
|
# verify the required parameter 'device_id' is set
|
286
|
-
fail "Missing the required parameter 'device_id' when calling get_device_token" if device_id.nil?
|
287
|
-
|
339
|
+
fail ArgumentError, "Missing the required parameter 'device_id' when calling DevicesApi.get_device_token" if device_id.nil?
|
288
340
|
# resource path
|
289
341
|
local_var_path = "/devices/{deviceId}/tokens".sub('{format}','json').sub('{' + 'deviceId' + '}', device_id.to_s)
|
290
342
|
|
@@ -295,19 +347,18 @@ module ArtikCloud
|
|
295
347
|
header_params = {}
|
296
348
|
|
297
349
|
# HTTP header 'Accept' (if needed)
|
298
|
-
|
299
|
-
|
350
|
+
local_header_accept = ['application/json']
|
351
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
300
352
|
|
301
353
|
# HTTP header 'Content-Type'
|
302
|
-
|
303
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
354
|
+
local_header_content_type = []
|
355
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
304
356
|
|
305
357
|
# form parameters
|
306
358
|
form_params = {}
|
307
359
|
|
308
360
|
# http body (model)
|
309
361
|
post_body = nil
|
310
|
-
|
311
362
|
auth_names = ['artikcloud_oauth']
|
312
363
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
313
364
|
:header_params => header_params,
|
@@ -329,7 +380,7 @@ module ArtikCloud
|
|
329
380
|
# @param [Hash] opts the optional parameters
|
330
381
|
# @return [DeviceEnvelope]
|
331
382
|
def update_device(device_id, device, opts = {})
|
332
|
-
data,
|
383
|
+
data, _status_code, _headers = update_device_with_http_info(device_id, device, opts)
|
333
384
|
return data
|
334
385
|
end
|
335
386
|
|
@@ -341,15 +392,12 @@ module ArtikCloud
|
|
341
392
|
# @return [Array<(DeviceEnvelope, Fixnum, Hash)>] DeviceEnvelope data, response status code and response headers
|
342
393
|
def update_device_with_http_info(device_id, device, opts = {})
|
343
394
|
if @api_client.config.debugging
|
344
|
-
@api_client.config.logger.debug "Calling API: DevicesApi
|
395
|
+
@api_client.config.logger.debug "Calling API: DevicesApi.update_device ..."
|
345
396
|
end
|
346
|
-
|
347
397
|
# verify the required parameter 'device_id' is set
|
348
|
-
fail "Missing the required parameter 'device_id' when calling update_device" if device_id.nil?
|
349
|
-
|
398
|
+
fail ArgumentError, "Missing the required parameter 'device_id' when calling DevicesApi.update_device" if device_id.nil?
|
350
399
|
# verify the required parameter 'device' is set
|
351
|
-
fail "Missing the required parameter 'device' when calling update_device" if device.nil?
|
352
|
-
|
400
|
+
fail ArgumentError, "Missing the required parameter 'device' when calling DevicesApi.update_device" if device.nil?
|
353
401
|
# resource path
|
354
402
|
local_var_path = "/devices/{deviceId}".sub('{format}','json').sub('{' + 'deviceId' + '}', device_id.to_s)
|
355
403
|
|
@@ -360,19 +408,18 @@ module ArtikCloud
|
|
360
408
|
header_params = {}
|
361
409
|
|
362
410
|
# HTTP header 'Accept' (if needed)
|
363
|
-
|
364
|
-
|
411
|
+
local_header_accept = ['application/json']
|
412
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
365
413
|
|
366
414
|
# HTTP header 'Content-Type'
|
367
|
-
|
368
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
415
|
+
local_header_content_type = ['application/json']
|
416
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
369
417
|
|
370
418
|
# form parameters
|
371
419
|
form_params = {}
|
372
420
|
|
373
421
|
# http body (model)
|
374
422
|
post_body = @api_client.object_to_http_body(device)
|
375
|
-
|
376
423
|
auth_names = ['artikcloud_oauth']
|
377
424
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
378
425
|
:header_params => header_params,
|
@@ -393,7 +440,7 @@ module ArtikCloud
|
|
393
440
|
# @param [Hash] opts the optional parameters
|
394
441
|
# @return [DeviceTokenEnvelope]
|
395
442
|
def update_device_token(device_id, opts = {})
|
396
|
-
data,
|
443
|
+
data, _status_code, _headers = update_device_token_with_http_info(device_id, opts)
|
397
444
|
return data
|
398
445
|
end
|
399
446
|
|
@@ -404,12 +451,10 @@ module ArtikCloud
|
|
404
451
|
# @return [Array<(DeviceTokenEnvelope, Fixnum, Hash)>] DeviceTokenEnvelope data, response status code and response headers
|
405
452
|
def update_device_token_with_http_info(device_id, opts = {})
|
406
453
|
if @api_client.config.debugging
|
407
|
-
@api_client.config.logger.debug "Calling API: DevicesApi
|
454
|
+
@api_client.config.logger.debug "Calling API: DevicesApi.update_device_token ..."
|
408
455
|
end
|
409
|
-
|
410
456
|
# verify the required parameter 'device_id' is set
|
411
|
-
fail "Missing the required parameter 'device_id' when calling update_device_token" if device_id.nil?
|
412
|
-
|
457
|
+
fail ArgumentError, "Missing the required parameter 'device_id' when calling DevicesApi.update_device_token" if device_id.nil?
|
413
458
|
# resource path
|
414
459
|
local_var_path = "/devices/{deviceId}/tokens".sub('{format}','json').sub('{' + 'deviceId' + '}', device_id.to_s)
|
415
460
|
|
@@ -420,19 +465,18 @@ module ArtikCloud
|
|
420
465
|
header_params = {}
|
421
466
|
|
422
467
|
# HTTP header 'Accept' (if needed)
|
423
|
-
|
424
|
-
|
468
|
+
local_header_accept = ['application/json']
|
469
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
425
470
|
|
426
471
|
# HTTP header 'Content-Type'
|
427
|
-
|
428
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
472
|
+
local_header_content_type = ['text/plain']
|
473
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
429
474
|
|
430
475
|
# form parameters
|
431
476
|
form_params = {}
|
432
477
|
|
433
478
|
# http body (model)
|
434
479
|
post_body = nil
|
435
|
-
|
436
480
|
auth_names = ['artikcloud_oauth']
|
437
481
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
438
482
|
:header_params => header_params,
|
@@ -1,14 +1,23 @@
|
|
1
1
|
=begin
|
2
|
-
ARTIK Cloud API
|
2
|
+
#ARTIK Cloud API
|
3
|
+
|
4
|
+
#No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
3
5
|
|
4
6
|
OpenAPI spec version: 2.0.0
|
5
7
|
|
6
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
7
9
|
|
8
|
-
License
|
9
|
-
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
you may not use this file except in compliance with the License.
|
12
|
+
You may obtain a copy of the License at
|
13
|
+
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
10
15
|
|
11
|
-
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
See the License for the specific language governing permissions and
|
20
|
+
limitations under the License.
|
12
21
|
|
13
22
|
=end
|
14
23
|
|
@@ -28,7 +37,7 @@ module ArtikCloud
|
|
28
37
|
# @param [Hash] opts the optional parameters
|
29
38
|
# @return [ExportRequestResponse]
|
30
39
|
def export_request(export_request_info, opts = {})
|
31
|
-
data,
|
40
|
+
data, _status_code, _headers = export_request_with_http_info(export_request_info, opts)
|
32
41
|
return data
|
33
42
|
end
|
34
43
|
|
@@ -39,12 +48,10 @@ module ArtikCloud
|
|
39
48
|
# @return [Array<(ExportRequestResponse, Fixnum, Hash)>] ExportRequestResponse data, response status code and response headers
|
40
49
|
def export_request_with_http_info(export_request_info, opts = {})
|
41
50
|
if @api_client.config.debugging
|
42
|
-
@api_client.config.logger.debug "Calling API: ExportApi
|
51
|
+
@api_client.config.logger.debug "Calling API: ExportApi.export_request ..."
|
43
52
|
end
|
44
|
-
|
45
53
|
# verify the required parameter 'export_request_info' is set
|
46
|
-
fail "Missing the required parameter 'export_request_info' when calling export_request" if export_request_info.nil?
|
47
|
-
|
54
|
+
fail ArgumentError, "Missing the required parameter 'export_request_info' when calling ExportApi.export_request" if export_request_info.nil?
|
48
55
|
# resource path
|
49
56
|
local_var_path = "/messages/export".sub('{format}','json')
|
50
57
|
|
@@ -55,19 +62,18 @@ module ArtikCloud
|
|
55
62
|
header_params = {}
|
56
63
|
|
57
64
|
# HTTP header 'Accept' (if needed)
|
58
|
-
|
59
|
-
|
65
|
+
local_header_accept = ['application/json']
|
66
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
60
67
|
|
61
68
|
# HTTP header 'Content-Type'
|
62
|
-
|
63
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
69
|
+
local_header_content_type = []
|
70
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
64
71
|
|
65
72
|
# form parameters
|
66
73
|
form_params = {}
|
67
74
|
|
68
75
|
# http body (model)
|
69
76
|
post_body = @api_client.object_to_http_body(export_request_info)
|
70
|
-
|
71
77
|
auth_names = ['artikcloud_oauth']
|
72
78
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
73
79
|
:header_params => header_params,
|
@@ -90,7 +96,7 @@ module ArtikCloud
|
|
90
96
|
# @option opts [Integer] :offset Pagination offset.
|
91
97
|
# @return [ExportHistoryResponse]
|
92
98
|
def get_export_history(opts = {})
|
93
|
-
data,
|
99
|
+
data, _status_code, _headers = get_export_history_with_http_info(opts)
|
94
100
|
return data
|
95
101
|
end
|
96
102
|
|
@@ -103,35 +109,33 @@ module ArtikCloud
|
|
103
109
|
# @return [Array<(ExportHistoryResponse, Fixnum, Hash)>] ExportHistoryResponse data, response status code and response headers
|
104
110
|
def get_export_history_with_http_info(opts = {})
|
105
111
|
if @api_client.config.debugging
|
106
|
-
@api_client.config.logger.debug "Calling API: ExportApi
|
112
|
+
@api_client.config.logger.debug "Calling API: ExportApi.get_export_history ..."
|
107
113
|
end
|
108
|
-
|
109
114
|
# resource path
|
110
115
|
local_var_path = "/messages/export/history".sub('{format}','json')
|
111
116
|
|
112
117
|
# query parameters
|
113
118
|
query_params = {}
|
114
|
-
query_params[:'trialId'] = opts[:'trial_id'] if opts[:'trial_id']
|
115
|
-
query_params[:'count'] = opts[:'count'] if opts[:'count']
|
116
|
-
query_params[:'offset'] = opts[:'offset'] if opts[:'offset']
|
119
|
+
query_params[:'trialId'] = opts[:'trial_id'] if !opts[:'trial_id'].nil?
|
120
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
121
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
117
122
|
|
118
123
|
# header parameters
|
119
124
|
header_params = {}
|
120
125
|
|
121
126
|
# HTTP header 'Accept' (if needed)
|
122
|
-
|
123
|
-
|
127
|
+
local_header_accept = ['application/json']
|
128
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
124
129
|
|
125
130
|
# HTTP header 'Content-Type'
|
126
|
-
|
127
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
131
|
+
local_header_content_type = []
|
132
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
128
133
|
|
129
134
|
# form parameters
|
130
135
|
form_params = {}
|
131
136
|
|
132
137
|
# http body (model)
|
133
138
|
post_body = nil
|
134
|
-
|
135
139
|
auth_names = ['artikcloud_oauth']
|
136
140
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
137
141
|
:header_params => header_params,
|
@@ -152,7 +156,7 @@ module ArtikCloud
|
|
152
156
|
# @param [Hash] opts the optional parameters
|
153
157
|
# @return [String]
|
154
158
|
def get_export_result(export_id, opts = {})
|
155
|
-
data,
|
159
|
+
data, _status_code, _headers = get_export_result_with_http_info(export_id, opts)
|
156
160
|
return data
|
157
161
|
end
|
158
162
|
|
@@ -163,12 +167,10 @@ module ArtikCloud
|
|
163
167
|
# @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
|
164
168
|
def get_export_result_with_http_info(export_id, opts = {})
|
165
169
|
if @api_client.config.debugging
|
166
|
-
@api_client.config.logger.debug "Calling API: ExportApi
|
170
|
+
@api_client.config.logger.debug "Calling API: ExportApi.get_export_result ..."
|
167
171
|
end
|
168
|
-
|
169
172
|
# verify the required parameter 'export_id' is set
|
170
|
-
fail "Missing the required parameter 'export_id' when calling get_export_result" if export_id.nil?
|
171
|
-
|
173
|
+
fail ArgumentError, "Missing the required parameter 'export_id' when calling ExportApi.get_export_result" if export_id.nil?
|
172
174
|
# resource path
|
173
175
|
local_var_path = "/messages/export/{exportId}/result".sub('{format}','json').sub('{' + 'exportId' + '}', export_id.to_s)
|
174
176
|
|
@@ -179,19 +181,18 @@ module ArtikCloud
|
|
179
181
|
header_params = {}
|
180
182
|
|
181
183
|
# HTTP header 'Accept' (if needed)
|
182
|
-
|
183
|
-
|
184
|
+
local_header_accept = ['application/json']
|
185
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
184
186
|
|
185
187
|
# HTTP header 'Content-Type'
|
186
|
-
|
187
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
188
|
+
local_header_content_type = []
|
189
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
188
190
|
|
189
191
|
# form parameters
|
190
192
|
form_params = {}
|
191
193
|
|
192
194
|
# http body (model)
|
193
195
|
post_body = nil
|
194
|
-
|
195
196
|
auth_names = ['artikcloud_oauth']
|
196
197
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
197
198
|
:header_params => header_params,
|
@@ -212,7 +213,7 @@ module ArtikCloud
|
|
212
213
|
# @param [Hash] opts the optional parameters
|
213
214
|
# @return [ExportStatusResponse]
|
214
215
|
def get_export_status(export_id, opts = {})
|
215
|
-
data,
|
216
|
+
data, _status_code, _headers = get_export_status_with_http_info(export_id, opts)
|
216
217
|
return data
|
217
218
|
end
|
218
219
|
|
@@ -223,12 +224,10 @@ module ArtikCloud
|
|
223
224
|
# @return [Array<(ExportStatusResponse, Fixnum, Hash)>] ExportStatusResponse data, response status code and response headers
|
224
225
|
def get_export_status_with_http_info(export_id, opts = {})
|
225
226
|
if @api_client.config.debugging
|
226
|
-
@api_client.config.logger.debug "Calling API: ExportApi
|
227
|
+
@api_client.config.logger.debug "Calling API: ExportApi.get_export_status ..."
|
227
228
|
end
|
228
|
-
|
229
229
|
# verify the required parameter 'export_id' is set
|
230
|
-
fail "Missing the required parameter 'export_id' when calling get_export_status" if export_id.nil?
|
231
|
-
|
230
|
+
fail ArgumentError, "Missing the required parameter 'export_id' when calling ExportApi.get_export_status" if export_id.nil?
|
232
231
|
# resource path
|
233
232
|
local_var_path = "/messages/export/{exportId}/status".sub('{format}','json').sub('{' + 'exportId' + '}', export_id.to_s)
|
234
233
|
|
@@ -239,19 +238,18 @@ module ArtikCloud
|
|
239
238
|
header_params = {}
|
240
239
|
|
241
240
|
# HTTP header 'Accept' (if needed)
|
242
|
-
|
243
|
-
|
241
|
+
local_header_accept = ['application/json']
|
242
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
244
243
|
|
245
244
|
# HTTP header 'Content-Type'
|
246
|
-
|
247
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
245
|
+
local_header_content_type = []
|
246
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
248
247
|
|
249
248
|
# form parameters
|
250
249
|
form_params = {}
|
251
250
|
|
252
251
|
# http body (model)
|
253
252
|
post_body = nil
|
254
|
-
|
255
253
|
auth_names = ['artikcloud_oauth']
|
256
254
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
257
255
|
:header_params => header_params,
|