artikcloud 2.0.0 → 2.0.5

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 (144) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +12 -12
  3. data/README.md +33 -10
  4. data/artikcloud.gemspec +5 -6
  5. data/docs/Action.md +9 -0
  6. data/docs/ActionArray.md +8 -0
  7. data/docs/Actions.md +12 -0
  8. data/docs/DeviceTypesApi.md +10 -10
  9. data/docs/DevicesApi.md +68 -15
  10. data/docs/ExportApi.md +10 -10
  11. data/docs/Message.md +11 -0
  12. data/docs/MessagesApi.md +205 -27
  13. data/docs/NormalizedAction.md +16 -0
  14. data/docs/NormalizedActionsEnvelope.md +17 -0
  15. data/docs/PresenceEnvelope.md +9 -0
  16. data/docs/PresenceModel.md +9 -0
  17. data/docs/RegistrationsApi.md +6 -6
  18. data/docs/RulesApi.md +8 -8
  19. data/docs/RulesEnvelope.md +1 -1
  20. data/docs/SnapshotResponse.md +9 -0
  21. data/docs/SnapshotResponses.md +10 -0
  22. data/docs/SnapshotsResponseEnvelope.md +9 -0
  23. data/docs/TagsApi.md +7 -7
  24. data/docs/TokenInfo.md +11 -0
  25. data/docs/TokenInfoSuccessResponse.md +8 -0
  26. data/docs/TokensApi.md +54 -7
  27. data/docs/UsersApi.md +18 -20
  28. data/git_push.sh +16 -1
  29. data/lib/artikcloud/api/device_types_api.rb +52 -59
  30. data/lib/artikcloud/api/devices_api.rb +120 -76
  31. data/lib/artikcloud/api/export_api.rb +43 -45
  32. data/lib/artikcloud/api/messages_api.rb +285 -103
  33. data/lib/artikcloud/api/registrations_api.rb +34 -34
  34. data/lib/artikcloud/api/rules_api.rb +43 -48
  35. data/lib/artikcloud/api/tags_api.rb +37 -35
  36. data/lib/artikcloud/api/tokens_api.rb +85 -30
  37. data/lib/artikcloud/api/users_api.rb +83 -102
  38. data/lib/artikcloud/api_client.rb +56 -13
  39. data/lib/artikcloud/api_error.rb +13 -4
  40. data/lib/artikcloud/configuration.rb +45 -1
  41. data/lib/artikcloud/models/ack_envelope.rb +59 -24
  42. data/lib/artikcloud/models/acknowledgement.rb +65 -33
  43. data/lib/artikcloud/models/action.rb +212 -0
  44. data/lib/artikcloud/models/action_array.rb +201 -0
  45. data/lib/artikcloud/models/action_details.rb +61 -27
  46. data/lib/artikcloud/models/action_details_array.rb +59 -24
  47. data/lib/artikcloud/models/action_in.rb +69 -39
  48. data/lib/artikcloud/models/action_out.rb +67 -36
  49. data/lib/artikcloud/models/actions.rb +241 -0
  50. data/lib/artikcloud/models/aggregate_data.rb +69 -39
  51. data/lib/artikcloud/models/aggregates_histogram_data.rb +71 -42
  52. data/lib/artikcloud/models/aggregates_histogram_response.rb +71 -42
  53. data/lib/artikcloud/models/aggregates_response.rb +69 -39
  54. data/lib/artikcloud/models/app_properties.rb +64 -30
  55. data/lib/artikcloud/models/check_token_message.rb +59 -24
  56. data/lib/artikcloud/models/check_token_response.rb +59 -24
  57. data/lib/artikcloud/models/device.rb +85 -63
  58. data/lib/artikcloud/models/device_array.rb +59 -24
  59. data/lib/artikcloud/models/device_envelope.rb +60 -24
  60. data/lib/artikcloud/models/device_reg_complete_request.rb +59 -24
  61. data/lib/artikcloud/models/device_reg_confirm_user_request.rb +63 -30
  62. data/lib/artikcloud/models/device_reg_confirm_user_response.rb +59 -24
  63. data/lib/artikcloud/models/device_reg_confirm_user_response_envelope.rb +59 -24
  64. data/lib/artikcloud/models/device_reg_status_response.rb +61 -27
  65. data/lib/artikcloud/models/device_reg_status_response_envelope.rb +59 -24
  66. data/lib/artikcloud/models/device_token.rb +69 -33
  67. data/lib/artikcloud/models/device_token_envelope.rb +60 -24
  68. data/lib/artikcloud/models/device_type.rb +93 -75
  69. data/lib/artikcloud/models/device_type_array.rb +59 -24
  70. data/lib/artikcloud/models/device_type_envelope.rb +60 -24
  71. data/lib/artikcloud/models/device_types_envelope.rb +68 -33
  72. data/lib/artikcloud/models/devices_envelope.rb +68 -33
  73. data/lib/artikcloud/models/error_envelope.rb +59 -24
  74. data/lib/artikcloud/models/export_data.rb +71 -42
  75. data/lib/artikcloud/models/export_data_array.rb +59 -24
  76. data/lib/artikcloud/models/export_history_response.rb +65 -33
  77. data/lib/artikcloud/models/export_normalized_messages_response.rb +83 -60
  78. data/lib/artikcloud/models/export_request.rb +73 -45
  79. data/lib/artikcloud/models/export_request_data.rb +79 -54
  80. data/lib/artikcloud/models/export_request_info.rb +77 -51
  81. data/lib/artikcloud/models/export_request_response.rb +59 -24
  82. data/lib/artikcloud/models/export_response.rb +79 -54
  83. data/lib/artikcloud/models/export_status_response.rb +67 -36
  84. data/lib/artikcloud/models/field_path.rb +59 -24
  85. data/lib/artikcloud/models/field_presence.rb +60 -24
  86. data/lib/artikcloud/models/field_presence_envelope.rb +78 -42
  87. data/lib/artikcloud/models/fields_actions.rb +61 -27
  88. data/lib/artikcloud/models/manifest_properties.rb +60 -24
  89. data/lib/artikcloud/models/manifest_properties_envelope.rb +60 -24
  90. data/lib/artikcloud/models/manifest_versions.rb +60 -24
  91. data/lib/artikcloud/models/manifest_versions_envelope.rb +60 -24
  92. data/lib/artikcloud/models/message.rb +233 -0
  93. data/lib/artikcloud/models/message_action.rb +67 -36
  94. data/lib/artikcloud/models/message_id.rb +59 -24
  95. data/lib/artikcloud/models/message_id_envelope.rb +59 -24
  96. data/lib/artikcloud/models/message_in.rb +69 -39
  97. data/lib/artikcloud/models/message_out.rb +67 -36
  98. data/lib/artikcloud/models/non_empty_string.rb +59 -24
  99. data/lib/artikcloud/models/normalized_action.rb +279 -0
  100. data/lib/artikcloud/models/normalized_actions_envelope.rb +285 -0
  101. data/lib/artikcloud/models/normalized_message.rb +81 -45
  102. data/lib/artikcloud/models/normalized_messages_envelope.rb +80 -51
  103. data/lib/artikcloud/models/output_rule.rb +85 -63
  104. data/lib/artikcloud/models/presence_envelope.rb +208 -0
  105. data/lib/artikcloud/models/presence_model.rb +208 -0
  106. data/lib/artikcloud/models/properties_envelope.rb +60 -24
  107. data/lib/artikcloud/models/refresh_token_response.rb +65 -33
  108. data/lib/artikcloud/models/register_message.rb +67 -36
  109. data/lib/artikcloud/models/rule_array.rb +59 -24
  110. data/lib/artikcloud/models/rule_creation_info.rb +65 -33
  111. data/lib/artikcloud/models/rule_envelope.rb +59 -24
  112. data/lib/artikcloud/models/rule_error.rb +65 -33
  113. data/lib/artikcloud/models/rule_update_info.rb +65 -33
  114. data/lib/artikcloud/models/rule_warning_output.rb +61 -27
  115. data/lib/artikcloud/models/rules_envelope.rb +69 -35
  116. data/lib/artikcloud/models/snapshot_response.rb +210 -0
  117. data/lib/artikcloud/models/snapshot_responses.rb +219 -0
  118. data/lib/artikcloud/models/snapshots_response_envelope.rb +208 -0
  119. data/lib/artikcloud/models/tag.rb +61 -27
  120. data/lib/artikcloud/models/tag_array.rb +59 -24
  121. data/lib/artikcloud/models/tags_envelope.rb +59 -24
  122. data/lib/artikcloud/models/token.rb +65 -33
  123. data/lib/artikcloud/models/token_info.rb +226 -0
  124. data/lib/artikcloud/models/token_info_success_response.rb +199 -0
  125. data/lib/artikcloud/models/token_request.rb +59 -24
  126. data/lib/artikcloud/models/token_response.rb +59 -24
  127. data/lib/artikcloud/models/unregister_device_response.rb +79 -54
  128. data/lib/artikcloud/models/unregister_device_response_envelope.rb +59 -24
  129. data/lib/artikcloud/models/user.rb +77 -42
  130. data/lib/artikcloud/models/user_envelope.rb +60 -24
  131. data/lib/artikcloud/models/web_socket_error.rb +63 -30
  132. data/lib/artikcloud/version.rb +14 -5
  133. data/lib/artikcloud.rb +26 -4
  134. data/spec/api/device_types_api_spec.rb +110 -0
  135. data/spec/api/devices_api_spec.rb +143 -0
  136. data/spec/api/export_api_spec.rb +96 -0
  137. data/spec/api/messages_api_spec.rb +7 -7
  138. data/spec/api/registrations_api_spec.rb +82 -0
  139. data/spec/api/rules_api_spec.rb +96 -0
  140. data/spec/api/tags_api_spec.rb +84 -0
  141. data/spec/api/tokens_api_spec.rb +12 -21
  142. data/spec/api/users_api_spec.rb +1 -1
  143. data/spec/spec_helper.rb +1 -1
  144. 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: MIT
9
- http://en.wikipedia.org/wiki/MIT_License
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
- Terms of Service: http://www.samsung.com/global/business/mobile/info/terms-and-conditions.html
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
 
@@ -22,7 +31,7 @@ module ArtikCloud
22
31
  @api_client = api_client
23
32
  end
24
33
 
25
- # Get Histogram aggregates
34
+ # Get Normalized Message Histogram
26
35
  # Get Histogram on normalized messages.
27
36
  # @param start_date Timestamp of earliest message (in milliseconds since epoch).
28
37
  # @param end_date Timestamp of latest message (in milliseconds since epoch).
@@ -32,11 +41,11 @@ module ArtikCloud
32
41
  # @option opts [String] :interval Interval of time for building histogram blocks. (Valid values: minute, hour, day, month, year)
33
42
  # @return [AggregatesHistogramResponse]
34
43
  def get_aggregates_histogram(start_date, end_date, opts = {})
35
- data, status_code, headers = get_aggregates_histogram_with_http_info(start_date, end_date, opts)
44
+ data, _status_code, _headers = get_aggregates_histogram_with_http_info(start_date, end_date, opts)
36
45
  return data
37
46
  end
38
47
 
39
- # Get Histogram aggregates
48
+ # Get Normalized Message Histogram
40
49
  # Get Histogram on normalized messages.
41
50
  # @param start_date Timestamp of earliest message (in milliseconds since epoch).
42
51
  # @param end_date Timestamp of latest message (in milliseconds since epoch).
@@ -47,15 +56,12 @@ module ArtikCloud
47
56
  # @return [Array<(AggregatesHistogramResponse, Fixnum, Hash)>] AggregatesHistogramResponse data, response status code and response headers
48
57
  def get_aggregates_histogram_with_http_info(start_date, end_date, opts = {})
49
58
  if @api_client.config.debugging
50
- @api_client.config.logger.debug "Calling API: MessagesApi#get_aggregates_histogram ..."
59
+ @api_client.config.logger.debug "Calling API: MessagesApi.get_aggregates_histogram ..."
51
60
  end
52
-
53
61
  # verify the required parameter 'start_date' is set
54
- fail "Missing the required parameter 'start_date' when calling get_aggregates_histogram" if start_date.nil?
55
-
62
+ fail ArgumentError, "Missing the required parameter 'start_date' when calling MessagesApi.get_aggregates_histogram" if start_date.nil?
56
63
  # verify the required parameter 'end_date' is set
57
- fail "Missing the required parameter 'end_date' when calling get_aggregates_histogram" if end_date.nil?
58
-
64
+ fail ArgumentError, "Missing the required parameter 'end_date' when calling MessagesApi.get_aggregates_histogram" if end_date.nil?
59
65
  # resource path
60
66
  local_var_path = "/messages/analytics/histogram".sub('{format}','json')
61
67
 
@@ -63,27 +69,26 @@ module ArtikCloud
63
69
  query_params = {}
64
70
  query_params[:'startDate'] = start_date
65
71
  query_params[:'endDate'] = end_date
66
- query_params[:'sdid'] = opts[:'sdid'] if opts[:'sdid']
67
- query_params[:'field'] = opts[:'field'] if opts[:'field']
68
- query_params[:'interval'] = opts[:'interval'] if opts[:'interval']
72
+ query_params[:'sdid'] = opts[:'sdid'] if !opts[:'sdid'].nil?
73
+ query_params[:'field'] = opts[:'field'] if !opts[:'field'].nil?
74
+ query_params[:'interval'] = opts[:'interval'] if !opts[:'interval'].nil?
69
75
 
70
76
  # header parameters
71
77
  header_params = {}
72
78
 
73
79
  # HTTP header 'Accept' (if needed)
74
- _header_accept = ['application/json']
75
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
80
+ local_header_accept = ['application/json']
81
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
76
82
 
77
83
  # HTTP header 'Content-Type'
78
- _header_content_type = []
79
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
84
+ local_header_content_type = []
85
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
80
86
 
81
87
  # form parameters
82
88
  form_params = {}
83
89
 
84
90
  # http body (model)
85
91
  post_body = nil
86
-
87
92
  auth_names = ['artikcloud_oauth']
88
93
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
89
94
  :header_params => header_params,
@@ -108,7 +113,7 @@ module ArtikCloud
108
113
  # @option opts [String] :field_presence String representing a field from the specified device ID.
109
114
  # @return [FieldPresenceEnvelope]
110
115
  def get_field_presence(start_date, end_date, interval, opts = {})
111
- data, status_code, headers = get_field_presence_with_http_info(start_date, end_date, interval, opts)
116
+ data, _status_code, _headers = get_field_presence_with_http_info(start_date, end_date, interval, opts)
112
117
  return data
113
118
  end
114
119
 
@@ -123,18 +128,14 @@ module ArtikCloud
123
128
  # @return [Array<(FieldPresenceEnvelope, Fixnum, Hash)>] FieldPresenceEnvelope data, response status code and response headers
124
129
  def get_field_presence_with_http_info(start_date, end_date, interval, opts = {})
125
130
  if @api_client.config.debugging
126
- @api_client.config.logger.debug "Calling API: MessagesApi#get_field_presence ..."
131
+ @api_client.config.logger.debug "Calling API: MessagesApi.get_field_presence ..."
127
132
  end
128
-
129
133
  # verify the required parameter 'start_date' is set
130
- fail "Missing the required parameter 'start_date' when calling get_field_presence" if start_date.nil?
131
-
134
+ fail ArgumentError, "Missing the required parameter 'start_date' when calling MessagesApi.get_field_presence" if start_date.nil?
132
135
  # verify the required parameter 'end_date' is set
133
- fail "Missing the required parameter 'end_date' when calling get_field_presence" if end_date.nil?
134
-
136
+ fail ArgumentError, "Missing the required parameter 'end_date' when calling MessagesApi.get_field_presence" if end_date.nil?
135
137
  # verify the required parameter 'interval' is set
136
- fail "Missing the required parameter 'interval' when calling get_field_presence" if interval.nil?
137
-
138
+ fail ArgumentError, "Missing the required parameter 'interval' when calling MessagesApi.get_field_presence" if interval.nil?
138
139
  # resource path
139
140
  local_var_path = "/messages/presence".sub('{format}','json')
140
141
 
@@ -143,26 +144,25 @@ module ArtikCloud
143
144
  query_params[:'startDate'] = start_date
144
145
  query_params[:'endDate'] = end_date
145
146
  query_params[:'interval'] = interval
146
- query_params[:'sdid'] = opts[:'sdid'] if opts[:'sdid']
147
- query_params[:'fieldPresence'] = opts[:'field_presence'] if opts[:'field_presence']
147
+ query_params[:'sdid'] = opts[:'sdid'] if !opts[:'sdid'].nil?
148
+ query_params[:'fieldPresence'] = opts[:'field_presence'] if !opts[:'field_presence'].nil?
148
149
 
149
150
  # header parameters
150
151
  header_params = {}
151
152
 
152
153
  # HTTP header 'Accept' (if needed)
153
- _header_accept = ['application/json']
154
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
154
+ local_header_accept = ['application/json']
155
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
155
156
 
156
157
  # HTTP header 'Content-Type'
157
- _header_content_type = []
158
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
158
+ local_header_content_type = []
159
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
159
160
 
160
161
  # form parameters
161
162
  form_params = {}
162
163
 
163
164
  # http body (model)
164
165
  post_body = nil
165
-
166
166
  auth_names = ['artikcloud_oauth']
167
167
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
168
168
  :header_params => header_params,
@@ -185,7 +185,7 @@ module ArtikCloud
185
185
  # @option opts [String] :field_presence String representing a field from the specified device ID.
186
186
  # @return [NormalizedMessagesEnvelope]
187
187
  def get_last_normalized_messages(opts = {})
188
- data, status_code, headers = get_last_normalized_messages_with_http_info(opts)
188
+ data, _status_code, _headers = get_last_normalized_messages_with_http_info(opts)
189
189
  return data
190
190
  end
191
191
 
@@ -198,35 +198,33 @@ module ArtikCloud
198
198
  # @return [Array<(NormalizedMessagesEnvelope, Fixnum, Hash)>] NormalizedMessagesEnvelope data, response status code and response headers
199
199
  def get_last_normalized_messages_with_http_info(opts = {})
200
200
  if @api_client.config.debugging
201
- @api_client.config.logger.debug "Calling API: MessagesApi#get_last_normalized_messages ..."
201
+ @api_client.config.logger.debug "Calling API: MessagesApi.get_last_normalized_messages ..."
202
202
  end
203
-
204
203
  # resource path
205
204
  local_var_path = "/messages/last".sub('{format}','json')
206
205
 
207
206
  # query parameters
208
207
  query_params = {}
209
- query_params[:'count'] = opts[:'count'] if opts[:'count']
210
- query_params[:'sdids'] = opts[:'sdids'] if opts[:'sdids']
211
- query_params[:'fieldPresence'] = opts[:'field_presence'] if opts[:'field_presence']
208
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
209
+ query_params[:'sdids'] = opts[:'sdids'] if !opts[:'sdids'].nil?
210
+ query_params[:'fieldPresence'] = opts[:'field_presence'] if !opts[:'field_presence'].nil?
212
211
 
213
212
  # header parameters
214
213
  header_params = {}
215
214
 
216
215
  # HTTP header 'Accept' (if needed)
217
- _header_accept = ['application/json']
218
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
216
+ local_header_accept = ['application/json']
217
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
219
218
 
220
219
  # HTTP header 'Content-Type'
221
- _header_content_type = []
222
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
220
+ local_header_content_type = []
221
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
223
222
 
224
223
  # form parameters
225
224
  form_params = {}
226
225
 
227
226
  # http body (model)
228
227
  post_body = nil
229
-
230
228
  auth_names = ['artikcloud_oauth']
231
229
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
232
230
  :header_params => header_params,
@@ -250,7 +248,7 @@ module ArtikCloud
250
248
  # @param [Hash] opts the optional parameters
251
249
  # @return [AggregatesResponse]
252
250
  def get_message_aggregates(sdid, field, start_date, end_date, opts = {})
253
- data, status_code, headers = get_message_aggregates_with_http_info(sdid, field, start_date, end_date, opts)
251
+ data, _status_code, _headers = get_message_aggregates_with_http_info(sdid, field, start_date, end_date, opts)
254
252
  return data
255
253
  end
256
254
 
@@ -264,21 +262,16 @@ module ArtikCloud
264
262
  # @return [Array<(AggregatesResponse, Fixnum, Hash)>] AggregatesResponse data, response status code and response headers
265
263
  def get_message_aggregates_with_http_info(sdid, field, start_date, end_date, opts = {})
266
264
  if @api_client.config.debugging
267
- @api_client.config.logger.debug "Calling API: MessagesApi#get_message_aggregates ..."
265
+ @api_client.config.logger.debug "Calling API: MessagesApi.get_message_aggregates ..."
268
266
  end
269
-
270
267
  # verify the required parameter 'sdid' is set
271
- fail "Missing the required parameter 'sdid' when calling get_message_aggregates" if sdid.nil?
272
-
268
+ fail ArgumentError, "Missing the required parameter 'sdid' when calling MessagesApi.get_message_aggregates" if sdid.nil?
273
269
  # verify the required parameter 'field' is set
274
- fail "Missing the required parameter 'field' when calling get_message_aggregates" if field.nil?
275
-
270
+ fail ArgumentError, "Missing the required parameter 'field' when calling MessagesApi.get_message_aggregates" if field.nil?
276
271
  # verify the required parameter 'start_date' is set
277
- fail "Missing the required parameter 'start_date' when calling get_message_aggregates" if start_date.nil?
278
-
272
+ fail ArgumentError, "Missing the required parameter 'start_date' when calling MessagesApi.get_message_aggregates" if start_date.nil?
279
273
  # verify the required parameter 'end_date' is set
280
- fail "Missing the required parameter 'end_date' when calling get_message_aggregates" if end_date.nil?
281
-
274
+ fail ArgumentError, "Missing the required parameter 'end_date' when calling MessagesApi.get_message_aggregates" if end_date.nil?
282
275
  # resource path
283
276
  local_var_path = "/messages/analytics/aggregates".sub('{format}','json')
284
277
 
@@ -293,19 +286,18 @@ module ArtikCloud
293
286
  header_params = {}
294
287
 
295
288
  # HTTP header 'Accept' (if needed)
296
- _header_accept = ['application/json']
297
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
289
+ local_header_accept = ['application/json']
290
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
298
291
 
299
292
  # HTTP header 'Content-Type'
300
- _header_content_type = []
301
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
293
+ local_header_content_type = []
294
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
302
295
 
303
296
  # form parameters
304
297
  form_params = {}
305
298
 
306
299
  # http body (model)
307
300
  post_body = nil
308
-
309
301
  auth_names = ['artikcloud_oauth']
310
302
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
311
303
  :header_params => header_params,
@@ -320,12 +312,150 @@ module ArtikCloud
320
312
  return data, status_code, headers
321
313
  end
322
314
 
315
+ # Get Message Snapshots
316
+ # Get message snapshots.
317
+ # @param sdids Device IDs for which the snapshots are requested. Max 100 device ids per call.
318
+ # @param [Hash] opts the optional parameters
319
+ # @option opts [BOOLEAN] :include_timestamp Indicates whether to return timestamps of the last update for each field.
320
+ # @return [SnapshotResponses]
321
+ def get_message_snapshots(sdids, opts = {})
322
+ data, _status_code, _headers = get_message_snapshots_with_http_info(sdids, opts)
323
+ return data
324
+ end
325
+
326
+ # Get Message Snapshots
327
+ # Get message snapshots.
328
+ # @param sdids Device IDs for which the snapshots are requested. Max 100 device ids per call.
329
+ # @param [Hash] opts the optional parameters
330
+ # @option opts [BOOLEAN] :include_timestamp Indicates whether to return timestamps of the last update for each field.
331
+ # @return [Array<(SnapshotResponses, Fixnum, Hash)>] SnapshotResponses data, response status code and response headers
332
+ def get_message_snapshots_with_http_info(sdids, opts = {})
333
+ if @api_client.config.debugging
334
+ @api_client.config.logger.debug "Calling API: MessagesApi.get_message_snapshots ..."
335
+ end
336
+ # verify the required parameter 'sdids' is set
337
+ fail ArgumentError, "Missing the required parameter 'sdids' when calling MessagesApi.get_message_snapshots" if sdids.nil?
338
+ # resource path
339
+ local_var_path = "/messages/snapshots".sub('{format}','json')
340
+
341
+ # query parameters
342
+ query_params = {}
343
+ query_params[:'sdids'] = sdids
344
+ query_params[:'includeTimestamp'] = opts[:'include_timestamp'] if !opts[:'include_timestamp'].nil?
345
+
346
+ # header parameters
347
+ header_params = {}
348
+
349
+ # HTTP header 'Accept' (if needed)
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
352
+
353
+ # HTTP header 'Content-Type'
354
+ local_header_content_type = []
355
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
356
+
357
+ # form parameters
358
+ form_params = {}
359
+
360
+ # http body (model)
361
+ post_body = nil
362
+ auth_names = ['artikcloud_oauth']
363
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
364
+ :header_params => header_params,
365
+ :query_params => query_params,
366
+ :form_params => form_params,
367
+ :body => post_body,
368
+ :auth_names => auth_names,
369
+ :return_type => 'SnapshotResponses')
370
+ if @api_client.config.debugging
371
+ @api_client.config.logger.debug "API called: MessagesApi#get_message_snapshots\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
372
+ end
373
+ return data, status_code, headers
374
+ end
375
+
376
+ # Get Normalized Actions
377
+ # Get the actions normalized
378
+ # @param [Hash] opts the optional parameters
379
+ # @option opts [String] :uid User ID. If not specified, assume that of the current authenticated user. If specified, it must be that of a user for which the current authenticated user has read access to.
380
+ # @option opts [String] :ddid Destination device ID of the actions being searched.
381
+ # @option opts [String] :mid The message ID being searched.
382
+ # @option opts [String] :offset A string that represents the starting item, should be the value of &#39;next&#39; field received in the last response. (required for pagination)
383
+ # @option opts [Integer] :count count
384
+ # @option opts [Integer] :start_date startDate
385
+ # @option opts [Integer] :end_date endDate
386
+ # @option opts [String] :order Desired sort order: &#39;asc&#39; or &#39;desc&#39;
387
+ # @return [NormalizedActionsEnvelope]
388
+ def get_normalized_actions(opts = {})
389
+ data, _status_code, _headers = get_normalized_actions_with_http_info(opts)
390
+ return data
391
+ end
392
+
393
+ # Get Normalized Actions
394
+ # Get the actions normalized
395
+ # @param [Hash] opts the optional parameters
396
+ # @option opts [String] :uid User ID. If not specified, assume that of the current authenticated user. If specified, it must be that of a user for which the current authenticated user has read access to.
397
+ # @option opts [String] :ddid Destination device ID of the actions being searched.
398
+ # @option opts [String] :mid The message ID being searched.
399
+ # @option opts [String] :offset A string that represents the starting item, should be the value of &#39;next&#39; field received in the last response. (required for pagination)
400
+ # @option opts [Integer] :count count
401
+ # @option opts [Integer] :start_date startDate
402
+ # @option opts [Integer] :end_date endDate
403
+ # @option opts [String] :order Desired sort order: &#39;asc&#39; or &#39;desc&#39;
404
+ # @return [Array<(NormalizedActionsEnvelope, Fixnum, Hash)>] NormalizedActionsEnvelope data, response status code and response headers
405
+ def get_normalized_actions_with_http_info(opts = {})
406
+ if @api_client.config.debugging
407
+ @api_client.config.logger.debug "Calling API: MessagesApi.get_normalized_actions ..."
408
+ end
409
+ # resource path
410
+ local_var_path = "/actions".sub('{format}','json')
411
+
412
+ # query parameters
413
+ query_params = {}
414
+ query_params[:'uid'] = opts[:'uid'] if !opts[:'uid'].nil?
415
+ query_params[:'ddid'] = opts[:'ddid'] if !opts[:'ddid'].nil?
416
+ query_params[:'mid'] = opts[:'mid'] if !opts[:'mid'].nil?
417
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
418
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
419
+ query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
420
+ query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
421
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
422
+
423
+ # header parameters
424
+ header_params = {}
425
+
426
+ # HTTP header 'Accept' (if needed)
427
+ local_header_accept = ['application/json']
428
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
429
+
430
+ # HTTP header 'Content-Type'
431
+ local_header_content_type = []
432
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
433
+
434
+ # form parameters
435
+ form_params = {}
436
+
437
+ # http body (model)
438
+ post_body = nil
439
+ auth_names = ['artikcloud_oauth']
440
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
441
+ :header_params => header_params,
442
+ :query_params => query_params,
443
+ :form_params => form_params,
444
+ :body => post_body,
445
+ :auth_names => auth_names,
446
+ :return_type => 'NormalizedActionsEnvelope')
447
+ if @api_client.config.debugging
448
+ @api_client.config.logger.debug "API called: MessagesApi#get_normalized_actions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
449
+ end
450
+ return data, status_code, headers
451
+ end
452
+
323
453
  # Get Normalized Messages
324
454
  # Get the messages normalized
325
455
  # @param [Hash] opts the optional parameters
326
456
  # @option opts [String] :uid User ID. If not specified, assume that of the current authenticated user. If specified, it must be that of a user for which the current authenticated user has read access to.
327
457
  # @option opts [String] :sdid Source device ID of the messages being searched.
328
- # @option opts [String] :mid The SAMI message ID being searched.
458
+ # @option opts [String] :mid The message ID being searched.
329
459
  # @option opts [String] :field_presence String representing a field from the specified device ID.
330
460
  # @option opts [String] :filter Filter.
331
461
  # @option opts [String] :offset A string that represents the starting item, should be the value of &#39;next&#39; field received in the last response. (required for pagination)
@@ -335,7 +465,7 @@ module ArtikCloud
335
465
  # @option opts [String] :order Desired sort order: &#39;asc&#39; or &#39;desc&#39;
336
466
  # @return [NormalizedMessagesEnvelope]
337
467
  def get_normalized_messages(opts = {})
338
- data, status_code, headers = get_normalized_messages_with_http_info(opts)
468
+ data, _status_code, _headers = get_normalized_messages_with_http_info(opts)
339
469
  return data
340
470
  end
341
471
 
@@ -344,7 +474,7 @@ module ArtikCloud
344
474
  # @param [Hash] opts the optional parameters
345
475
  # @option opts [String] :uid User ID. If not specified, assume that of the current authenticated user. If specified, it must be that of a user for which the current authenticated user has read access to.
346
476
  # @option opts [String] :sdid Source device ID of the messages being searched.
347
- # @option opts [String] :mid The SAMI message ID being searched.
477
+ # @option opts [String] :mid The message ID being searched.
348
478
  # @option opts [String] :field_presence String representing a field from the specified device ID.
349
479
  # @option opts [String] :filter Filter.
350
480
  # @option opts [String] :offset A string that represents the starting item, should be the value of &#39;next&#39; field received in the last response. (required for pagination)
@@ -355,42 +485,40 @@ module ArtikCloud
355
485
  # @return [Array<(NormalizedMessagesEnvelope, Fixnum, Hash)>] NormalizedMessagesEnvelope data, response status code and response headers
356
486
  def get_normalized_messages_with_http_info(opts = {})
357
487
  if @api_client.config.debugging
358
- @api_client.config.logger.debug "Calling API: MessagesApi#get_normalized_messages ..."
488
+ @api_client.config.logger.debug "Calling API: MessagesApi.get_normalized_messages ..."
359
489
  end
360
-
361
490
  # resource path
362
491
  local_var_path = "/messages".sub('{format}','json')
363
492
 
364
493
  # query parameters
365
494
  query_params = {}
366
- query_params[:'uid'] = opts[:'uid'] if opts[:'uid']
367
- query_params[:'sdid'] = opts[:'sdid'] if opts[:'sdid']
368
- query_params[:'mid'] = opts[:'mid'] if opts[:'mid']
369
- query_params[:'fieldPresence'] = opts[:'field_presence'] if opts[:'field_presence']
370
- query_params[:'filter'] = opts[:'filter'] if opts[:'filter']
371
- query_params[:'offset'] = opts[:'offset'] if opts[:'offset']
372
- query_params[:'count'] = opts[:'count'] if opts[:'count']
373
- query_params[:'startDate'] = opts[:'start_date'] if opts[:'start_date']
374
- query_params[:'endDate'] = opts[:'end_date'] if opts[:'end_date']
375
- query_params[:'order'] = opts[:'order'] if opts[:'order']
495
+ query_params[:'uid'] = opts[:'uid'] if !opts[:'uid'].nil?
496
+ query_params[:'sdid'] = opts[:'sdid'] if !opts[:'sdid'].nil?
497
+ query_params[:'mid'] = opts[:'mid'] if !opts[:'mid'].nil?
498
+ query_params[:'fieldPresence'] = opts[:'field_presence'] if !opts[:'field_presence'].nil?
499
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
500
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
501
+ query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
502
+ query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
503
+ query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
504
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
376
505
 
377
506
  # header parameters
378
507
  header_params = {}
379
508
 
380
509
  # HTTP header 'Accept' (if needed)
381
- _header_accept = ['application/json']
382
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
510
+ local_header_accept = ['application/json']
511
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
383
512
 
384
513
  # HTTP header 'Content-Type'
385
- _header_content_type = []
386
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
514
+ local_header_content_type = []
515
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
387
516
 
388
517
  # form parameters
389
518
  form_params = {}
390
519
 
391
520
  # http body (model)
392
521
  post_body = nil
393
-
394
522
  auth_names = ['artikcloud_oauth']
395
523
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
396
524
  :header_params => header_params,
@@ -405,29 +533,84 @@ module ArtikCloud
405
533
  return data, status_code, headers
406
534
  end
407
535
 
408
- # Send Message Action
409
- # Send a message or an Action:<br/><table><tr><th>Combination</th><th>Parameters</th><th>Description</th></tr><tr><td>Send Message</td><td>sdid, type=message</td><td>Send a message from a Source Device</td></tr><tr><td>Send Action</td><td>ddid, type=action</td><td>Send an action to a Destination Device</td></tr><tr><td>Common</td><td>data, ts, token</td><td>Parameters that can be used with the above combinations.</td></tr></table>
410
- # @param data Message or Action object that is passed in the body
536
+ # Send Actions
537
+ # Send Actions
538
+ # @param data Actions that are passed in the body
539
+ # @param [Hash] opts the optional parameters
540
+ # @return [MessageIDEnvelope]
541
+ def send_actions(data, opts = {})
542
+ data, _status_code, _headers = send_actions_with_http_info(data, opts)
543
+ return data
544
+ end
545
+
546
+ # Send Actions
547
+ # Send Actions
548
+ # @param data Actions that are passed in the body
549
+ # @param [Hash] opts the optional parameters
550
+ # @return [Array<(MessageIDEnvelope, Fixnum, Hash)>] MessageIDEnvelope data, response status code and response headers
551
+ def send_actions_with_http_info(data, opts = {})
552
+ if @api_client.config.debugging
553
+ @api_client.config.logger.debug "Calling API: MessagesApi.send_actions ..."
554
+ end
555
+ # verify the required parameter 'data' is set
556
+ fail ArgumentError, "Missing the required parameter 'data' when calling MessagesApi.send_actions" if data.nil?
557
+ # resource path
558
+ local_var_path = "/actions".sub('{format}','json')
559
+
560
+ # query parameters
561
+ query_params = {}
562
+
563
+ # header parameters
564
+ header_params = {}
565
+
566
+ # HTTP header 'Accept' (if needed)
567
+ local_header_accept = ['application/json']
568
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
569
+
570
+ # HTTP header 'Content-Type'
571
+ local_header_content_type = []
572
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
573
+
574
+ # form parameters
575
+ form_params = {}
576
+
577
+ # http body (model)
578
+ post_body = @api_client.object_to_http_body(data)
579
+ auth_names = ['artikcloud_oauth']
580
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
581
+ :header_params => header_params,
582
+ :query_params => query_params,
583
+ :form_params => form_params,
584
+ :body => post_body,
585
+ :auth_names => auth_names,
586
+ :return_type => 'MessageIDEnvelope')
587
+ if @api_client.config.debugging
588
+ @api_client.config.logger.debug "API called: MessagesApi#send_actions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
589
+ end
590
+ return data, status_code, headers
591
+ end
592
+
593
+ # Send Message
594
+ # Send a message
595
+ # @param data Message object that is passed in the body
411
596
  # @param [Hash] opts the optional parameters
412
597
  # @return [MessageIDEnvelope]
413
- def send_message_action(data, opts = {})
414
- data, status_code, headers = send_message_action_with_http_info(data, opts)
598
+ def send_message(data, opts = {})
599
+ data, _status_code, _headers = send_message_with_http_info(data, opts)
415
600
  return data
416
601
  end
417
602
 
418
- # Send Message Action
419
- # Send a message or an Action:&lt;br/&gt;&lt;table&gt;&lt;tr&gt;&lt;th&gt;Combination&lt;/th&gt;&lt;th&gt;Parameters&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Send Message&lt;/td&gt;&lt;td&gt;sdid, type=message&lt;/td&gt;&lt;td&gt;Send a message from a Source Device&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Send Action&lt;/td&gt;&lt;td&gt;ddid, type=action&lt;/td&gt;&lt;td&gt;Send an action to a Destination Device&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Common&lt;/td&gt;&lt;td&gt;data, ts, token&lt;/td&gt;&lt;td&gt;Parameters that can be used with the above combinations.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
420
- # @param data Message or Action object that is passed in the body
603
+ # Send Message
604
+ # Send a message
605
+ # @param data Message object that is passed in the body
421
606
  # @param [Hash] opts the optional parameters
422
607
  # @return [Array<(MessageIDEnvelope, Fixnum, Hash)>] MessageIDEnvelope data, response status code and response headers
423
- def send_message_action_with_http_info(data, opts = {})
608
+ def send_message_with_http_info(data, opts = {})
424
609
  if @api_client.config.debugging
425
- @api_client.config.logger.debug "Calling API: MessagesApi#send_message_action ..."
610
+ @api_client.config.logger.debug "Calling API: MessagesApi.send_message ..."
426
611
  end
427
-
428
612
  # verify the required parameter 'data' is set
429
- fail "Missing the required parameter 'data' when calling send_message_action" if data.nil?
430
-
613
+ fail ArgumentError, "Missing the required parameter 'data' when calling MessagesApi.send_message" if data.nil?
431
614
  # resource path
432
615
  local_var_path = "/messages".sub('{format}','json')
433
616
 
@@ -438,19 +621,18 @@ module ArtikCloud
438
621
  header_params = {}
439
622
 
440
623
  # HTTP header 'Accept' (if needed)
441
- _header_accept = ['application/json']
442
- _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
624
+ local_header_accept = ['application/json']
625
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
443
626
 
444
627
  # HTTP header 'Content-Type'
445
- _header_content_type = []
446
- header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
628
+ local_header_content_type = []
629
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
447
630
 
448
631
  # form parameters
449
632
  form_params = {}
450
633
 
451
634
  # http body (model)
452
635
  post_body = @api_client.object_to_http_body(data)
453
-
454
636
  auth_names = ['artikcloud_oauth']
455
637
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
456
638
  :header_params => header_params,
@@ -460,7 +642,7 @@ module ArtikCloud
460
642
  :auth_names => auth_names,
461
643
  :return_type => 'MessageIDEnvelope')
462
644
  if @api_client.config.debugging
463
- @api_client.config.logger.debug "API called: MessagesApi#send_message_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
645
+ @api_client.config.logger.debug "API called: MessagesApi#send_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
464
646
  end
465
647
  return data, status_code, headers
466
648
  end