artikcloud 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +65 -0
- data/LICENSE +202 -0
- data/README.md +230 -0
- data/artikcloud.gemspec +32 -0
- data/docs/AckEnvelope.md +8 -0
- data/docs/Acknowledgement.md +11 -0
- data/docs/ActionDetails.md +9 -0
- data/docs/ActionDetailsArray.md +8 -0
- data/docs/ActionIn.md +13 -0
- data/docs/ActionOut.md +12 -0
- data/docs/AggregateData.md +13 -0
- data/docs/AggregatesHistogramData.md +14 -0
- data/docs/AggregatesHistogramResponse.md +14 -0
- data/docs/AggregatesResponse.md +13 -0
- data/docs/AppProperties.md +10 -0
- data/docs/CheckTokenMessage.md +8 -0
- data/docs/CheckTokenResponse.md +8 -0
- data/docs/Device.md +21 -0
- data/docs/DeviceArray.md +8 -0
- data/docs/DeviceEnvelope.md +8 -0
- data/docs/DeviceRegCompleteRequest.md +8 -0
- data/docs/DeviceRegConfirmUserRequest.md +10 -0
- data/docs/DeviceRegConfirmUserResponse.md +8 -0
- data/docs/DeviceRegConfirmUserResponseEnvelope.md +8 -0
- data/docs/DeviceRegStatusResponse.md +9 -0
- data/docs/DeviceRegStatusResponseEnvelope.md +8 -0
- data/docs/DeviceToken.md +11 -0
- data/docs/DeviceTokenEnvelope.md +8 -0
- data/docs/DeviceType.md +25 -0
- data/docs/DeviceTypeArray.md +8 -0
- data/docs/DeviceTypeEnvelope.md +8 -0
- data/docs/DeviceTypesApi.md +284 -0
- data/docs/DeviceTypesEnvelope.md +11 -0
- data/docs/DevicesApi.md +382 -0
- data/docs/DevicesEnvelope.md +11 -0
- data/docs/ErrorEnvelope.md +8 -0
- data/docs/ExportApi.md +225 -0
- data/docs/ExportData.md +14 -0
- data/docs/ExportDataArray.md +8 -0
- data/docs/ExportHistoryResponse.md +11 -0
- data/docs/ExportNormalizedMessagesResponse.md +20 -0
- data/docs/ExportRequest.md +15 -0
- data/docs/ExportRequestData.md +18 -0
- data/docs/ExportRequestInfo.md +17 -0
- data/docs/ExportRequestResponse.md +8 -0
- data/docs/ExportResponse.md +18 -0
- data/docs/ExportStatusResponse.md +12 -0
- data/docs/FieldPath.md +8 -0
- data/docs/FieldPresence.md +8 -0
- data/docs/FieldPresenceEnvelope.md +14 -0
- data/docs/FieldsActions.md +9 -0
- data/docs/ManifestProperties.md +8 -0
- data/docs/ManifestPropertiesEnvelope.md +8 -0
- data/docs/ManifestVersions.md +8 -0
- data/docs/ManifestVersionsEnvelope.md +8 -0
- data/docs/MessageAction.md +12 -0
- data/docs/MessageID.md +8 -0
- data/docs/MessageIDEnvelope.md +8 -0
- data/docs/MessageIn.md +13 -0
- data/docs/MessageOut.md +12 -0
- data/docs/MessagesApi.md +382 -0
- data/docs/NonEmptyString.md +8 -0
- data/docs/NormalizedMessage.md +15 -0
- data/docs/NormalizedMessagesEnvelope.md +17 -0
- data/docs/OutputRule.md +21 -0
- data/docs/PropertiesEnvelope.md +8 -0
- data/docs/RefreshTokenResponse.md +11 -0
- data/docs/RegisterMessage.md +12 -0
- data/docs/RegistrationsApi.md +167 -0
- data/docs/RuleArray.md +8 -0
- data/docs/RuleCreationInfo.md +11 -0
- data/docs/RuleEnvelope.md +8 -0
- data/docs/RuleError.md +11 -0
- data/docs/RuleUpdateInfo.md +11 -0
- data/docs/RuleWarningOutput.md +9 -0
- data/docs/RulesApi.md +226 -0
- data/docs/RulesEnvelope.md +11 -0
- data/docs/Tag.md +9 -0
- data/docs/TagArray.md +8 -0
- data/docs/TagsApi.md +169 -0
- data/docs/TagsEnvelope.md +8 -0
- data/docs/Token.md +11 -0
- data/docs/TokenRequest.md +8 -0
- data/docs/TokenResponse.md +8 -0
- data/docs/TokensApi.md +117 -0
- data/docs/UnregisterDeviceResponse.md +18 -0
- data/docs/UnregisterDeviceResponseEnvelope.md +8 -0
- data/docs/User.md +14 -0
- data/docs/UserEnvelope.md +8 -0
- data/docs/UsersApi.md +474 -0
- data/docs/WebSocketError.md +10 -0
- data/git_push.sh +52 -0
- data/lib/artikcloud/api/device_types_api.rb +340 -0
- data/lib/artikcloud/api/devices_api.rb +450 -0
- data/lib/artikcloud/api/export_api.rb +269 -0
- data/lib/artikcloud/api/messages_api.rb +468 -0
- data/lib/artikcloud/api/registrations_api.rb +205 -0
- data/lib/artikcloud/api/rules_api.rb +276 -0
- data/lib/artikcloud/api/tags_api.rb +209 -0
- data/lib/artikcloud/api/tokens_api.rb +152 -0
- data/lib/artikcloud/api/users_api.rb +552 -0
- data/lib/artikcloud/api_client.rb +336 -0
- data/lib/artikcloud/api_error.rb +38 -0
- data/lib/artikcloud/configuration.rb +170 -0
- data/lib/artikcloud/models/ack_envelope.rb +164 -0
- data/lib/artikcloud/models/acknowledgement.rb +198 -0
- data/lib/artikcloud/models/action_details.rb +178 -0
- data/lib/artikcloud/models/action_details_array.rb +166 -0
- data/lib/artikcloud/models/action_in.rb +221 -0
- data/lib/artikcloud/models/action_out.rb +209 -0
- data/lib/artikcloud/models/aggregate_data.rb +214 -0
- data/lib/artikcloud/models/aggregates_histogram_data.rb +224 -0
- data/lib/artikcloud/models/aggregates_histogram_response.rb +226 -0
- data/lib/artikcloud/models/aggregates_response.rb +216 -0
- data/lib/artikcloud/models/app_properties.rb +184 -0
- data/lib/artikcloud/models/check_token_message.rb +164 -0
- data/lib/artikcloud/models/check_token_response.rb +164 -0
- data/lib/artikcloud/models/device.rb +310 -0
- data/lib/artikcloud/models/device_array.rb +166 -0
- data/lib/artikcloud/models/device_envelope.rb +164 -0
- data/lib/artikcloud/models/device_reg_complete_request.rb +165 -0
- data/lib/artikcloud/models/device_reg_confirm_user_request.rb +187 -0
- data/lib/artikcloud/models/device_reg_confirm_user_response.rb +165 -0
- data/lib/artikcloud/models/device_reg_confirm_user_response_envelope.rb +164 -0
- data/lib/artikcloud/models/device_reg_status_response.rb +176 -0
- data/lib/artikcloud/models/device_reg_status_response_envelope.rb +164 -0
- data/lib/artikcloud/models/device_token.rb +194 -0
- data/lib/artikcloud/models/device_token_envelope.rb +164 -0
- data/lib/artikcloud/models/device_type.rb +353 -0
- data/lib/artikcloud/models/device_type_array.rb +166 -0
- data/lib/artikcloud/models/device_type_envelope.rb +164 -0
- data/lib/artikcloud/models/device_types_envelope.rb +194 -0
- data/lib/artikcloud/models/devices_envelope.rb +194 -0
- data/lib/artikcloud/models/error_envelope.rb +165 -0
- data/lib/artikcloud/models/export_data.rb +225 -0
- data/lib/artikcloud/models/export_data_array.rb +166 -0
- data/lib/artikcloud/models/export_history_response.rb +194 -0
- data/lib/artikcloud/models/export_normalized_messages_response.rb +284 -0
- data/lib/artikcloud/models/export_request.rb +234 -0
- data/lib/artikcloud/models/export_request_data.rb +275 -0
- data/lib/artikcloud/models/export_request_info.rb +264 -0
- data/lib/artikcloud/models/export_request_response.rb +164 -0
- data/lib/artikcloud/models/export_response.rb +275 -0
- data/lib/artikcloud/models/export_status_response.rb +205 -0
- data/lib/artikcloud/models/field_path.rb +166 -0
- data/lib/artikcloud/models/field_presence.rb +164 -0
- data/lib/artikcloud/models/field_presence_envelope.rb +226 -0
- data/lib/artikcloud/models/fields_actions.rb +180 -0
- data/lib/artikcloud/models/manifest_properties.rb +164 -0
- data/lib/artikcloud/models/manifest_properties_envelope.rb +164 -0
- data/lib/artikcloud/models/manifest_versions.rb +166 -0
- data/lib/artikcloud/models/manifest_versions_envelope.rb +164 -0
- data/lib/artikcloud/models/message_action.rb +210 -0
- data/lib/artikcloud/models/message_id.rb +165 -0
- data/lib/artikcloud/models/message_id_envelope.rb +164 -0
- data/lib/artikcloud/models/message_in.rb +224 -0
- data/lib/artikcloud/models/message_out.rb +209 -0
- data/lib/artikcloud/models/non_empty_string.rb +164 -0
- data/lib/artikcloud/models/normalized_message.rb +236 -0
- data/lib/artikcloud/models/normalized_messages_envelope.rb +256 -0
- data/lib/artikcloud/models/output_rule.rb +296 -0
- data/lib/artikcloud/models/properties_envelope.rb +164 -0
- data/lib/artikcloud/models/refresh_token_response.rb +194 -0
- data/lib/artikcloud/models/register_message.rb +211 -0
- data/lib/artikcloud/models/rule_array.rb +166 -0
- data/lib/artikcloud/models/rule_creation_info.rb +200 -0
- data/lib/artikcloud/models/rule_envelope.rb +164 -0
- data/lib/artikcloud/models/rule_error.rb +196 -0
- data/lib/artikcloud/models/rule_update_info.rb +200 -0
- data/lib/artikcloud/models/rule_warning_output.rb +174 -0
- data/lib/artikcloud/models/rules_envelope.rb +194 -0
- data/lib/artikcloud/models/tag.rb +176 -0
- data/lib/artikcloud/models/tag_array.rb +166 -0
- data/lib/artikcloud/models/tags_envelope.rb +164 -0
- data/lib/artikcloud/models/token.rb +194 -0
- data/lib/artikcloud/models/token_request.rb +164 -0
- data/lib/artikcloud/models/token_response.rb +164 -0
- data/lib/artikcloud/models/unregister_device_response.rb +275 -0
- data/lib/artikcloud/models/unregister_device_response_envelope.rb +164 -0
- data/lib/artikcloud/models/user.rb +224 -0
- data/lib/artikcloud/models/user_envelope.rb +164 -0
- data/lib/artikcloud/models/web_socket_error.rb +187 -0
- data/lib/artikcloud/version.rb +17 -0
- data/lib/artikcloud.rb +128 -0
- data/pom.xml +60 -0
- data/spec/api/messages_api_spec.rb +79 -0
- data/spec/api/tokens_api_spec.rb +79 -0
- data/spec/api/users_api_spec.rb +50 -0
- data/spec/spec.opts +4 -0
- data/spec/spec_helper.rb +36 -0
- metadata +420 -0
@@ -0,0 +1,276 @@
|
|
1
|
+
=begin
|
2
|
+
ARTIK Cloud API
|
3
|
+
|
4
|
+
OpenAPI spec version: 2.0.0
|
5
|
+
|
6
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
7
|
+
|
8
|
+
License: MIT
|
9
|
+
http://en.wikipedia.org/wiki/MIT_License
|
10
|
+
|
11
|
+
Terms of Service: http://www.samsung.com/global/business/mobile/info/terms-and-conditions.html
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
require "uri"
|
16
|
+
|
17
|
+
module ArtikCloud
|
18
|
+
class RulesApi
|
19
|
+
attr_accessor :api_client
|
20
|
+
|
21
|
+
def initialize(api_client = ApiClient.default)
|
22
|
+
@api_client = api_client
|
23
|
+
end
|
24
|
+
|
25
|
+
# Create Rule
|
26
|
+
# Create a new Rule
|
27
|
+
# @param rule_info Rule object that needs to be added
|
28
|
+
# @param user_id User ID
|
29
|
+
# @param [Hash] opts the optional parameters
|
30
|
+
# @return [RuleEnvelope]
|
31
|
+
def create_rule(rule_info, user_id, opts = {})
|
32
|
+
data, status_code, headers = create_rule_with_http_info(rule_info, user_id, opts)
|
33
|
+
return data
|
34
|
+
end
|
35
|
+
|
36
|
+
# Create Rule
|
37
|
+
# Create a new Rule
|
38
|
+
# @param rule_info Rule object that needs to be added
|
39
|
+
# @param user_id User ID
|
40
|
+
# @param [Hash] opts the optional parameters
|
41
|
+
# @return [Array<(RuleEnvelope, Fixnum, Hash)>] RuleEnvelope data, response status code and response headers
|
42
|
+
def create_rule_with_http_info(rule_info, user_id, opts = {})
|
43
|
+
if @api_client.config.debugging
|
44
|
+
@api_client.config.logger.debug "Calling API: RulesApi#create_rule ..."
|
45
|
+
end
|
46
|
+
|
47
|
+
# verify the required parameter 'rule_info' is set
|
48
|
+
fail "Missing the required parameter 'rule_info' when calling create_rule" if rule_info.nil?
|
49
|
+
|
50
|
+
# verify the required parameter 'user_id' is set
|
51
|
+
fail "Missing the required parameter 'user_id' when calling create_rule" if user_id.nil?
|
52
|
+
|
53
|
+
# resource path
|
54
|
+
local_var_path = "/rules".sub('{format}','json')
|
55
|
+
|
56
|
+
# query parameters
|
57
|
+
query_params = {}
|
58
|
+
query_params[:'userId'] = user_id
|
59
|
+
|
60
|
+
# header parameters
|
61
|
+
header_params = {}
|
62
|
+
|
63
|
+
# HTTP header 'Accept' (if needed)
|
64
|
+
_header_accept = ['application/json']
|
65
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
66
|
+
|
67
|
+
# HTTP header 'Content-Type'
|
68
|
+
_header_content_type = []
|
69
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
70
|
+
|
71
|
+
# form parameters
|
72
|
+
form_params = {}
|
73
|
+
|
74
|
+
# http body (model)
|
75
|
+
post_body = @api_client.object_to_http_body(rule_info)
|
76
|
+
|
77
|
+
auth_names = ['artikcloud_oauth']
|
78
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
79
|
+
:header_params => header_params,
|
80
|
+
:query_params => query_params,
|
81
|
+
:form_params => form_params,
|
82
|
+
:body => post_body,
|
83
|
+
:auth_names => auth_names,
|
84
|
+
:return_type => 'RuleEnvelope')
|
85
|
+
if @api_client.config.debugging
|
86
|
+
@api_client.config.logger.debug "API called: RulesApi#create_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
87
|
+
end
|
88
|
+
return data, status_code, headers
|
89
|
+
end
|
90
|
+
|
91
|
+
# Delete Rule
|
92
|
+
# Delete a Rule
|
93
|
+
# @param rule_id Rule ID.
|
94
|
+
# @param [Hash] opts the optional parameters
|
95
|
+
# @return [RuleEnvelope]
|
96
|
+
def delete_rule(rule_id, opts = {})
|
97
|
+
data, status_code, headers = delete_rule_with_http_info(rule_id, opts)
|
98
|
+
return data
|
99
|
+
end
|
100
|
+
|
101
|
+
# Delete Rule
|
102
|
+
# Delete a Rule
|
103
|
+
# @param rule_id Rule ID.
|
104
|
+
# @param [Hash] opts the optional parameters
|
105
|
+
# @return [Array<(RuleEnvelope, Fixnum, Hash)>] RuleEnvelope data, response status code and response headers
|
106
|
+
def delete_rule_with_http_info(rule_id, opts = {})
|
107
|
+
if @api_client.config.debugging
|
108
|
+
@api_client.config.logger.debug "Calling API: RulesApi#delete_rule ..."
|
109
|
+
end
|
110
|
+
|
111
|
+
# verify the required parameter 'rule_id' is set
|
112
|
+
fail "Missing the required parameter 'rule_id' when calling delete_rule" if rule_id.nil?
|
113
|
+
|
114
|
+
# resource path
|
115
|
+
local_var_path = "/rules/{ruleId}".sub('{format}','json').sub('{' + 'ruleId' + '}', rule_id.to_s)
|
116
|
+
|
117
|
+
# query parameters
|
118
|
+
query_params = {}
|
119
|
+
|
120
|
+
# header parameters
|
121
|
+
header_params = {}
|
122
|
+
|
123
|
+
# HTTP header 'Accept' (if needed)
|
124
|
+
_header_accept = ['application/json']
|
125
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
126
|
+
|
127
|
+
# HTTP header 'Content-Type'
|
128
|
+
_header_content_type = []
|
129
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
130
|
+
|
131
|
+
# form parameters
|
132
|
+
form_params = {}
|
133
|
+
|
134
|
+
# http body (model)
|
135
|
+
post_body = nil
|
136
|
+
|
137
|
+
auth_names = ['artikcloud_oauth']
|
138
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
139
|
+
:header_params => header_params,
|
140
|
+
:query_params => query_params,
|
141
|
+
:form_params => form_params,
|
142
|
+
:body => post_body,
|
143
|
+
:auth_names => auth_names,
|
144
|
+
:return_type => 'RuleEnvelope')
|
145
|
+
if @api_client.config.debugging
|
146
|
+
@api_client.config.logger.debug "API called: RulesApi#delete_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
147
|
+
end
|
148
|
+
return data, status_code, headers
|
149
|
+
end
|
150
|
+
|
151
|
+
# Get Rule
|
152
|
+
# Get a rule using the Rule ID
|
153
|
+
# @param rule_id Rule ID.
|
154
|
+
# @param [Hash] opts the optional parameters
|
155
|
+
# @return [RuleEnvelope]
|
156
|
+
def get_rule(rule_id, opts = {})
|
157
|
+
data, status_code, headers = get_rule_with_http_info(rule_id, opts)
|
158
|
+
return data
|
159
|
+
end
|
160
|
+
|
161
|
+
# Get Rule
|
162
|
+
# Get a rule using the Rule ID
|
163
|
+
# @param rule_id Rule ID.
|
164
|
+
# @param [Hash] opts the optional parameters
|
165
|
+
# @return [Array<(RuleEnvelope, Fixnum, Hash)>] RuleEnvelope data, response status code and response headers
|
166
|
+
def get_rule_with_http_info(rule_id, opts = {})
|
167
|
+
if @api_client.config.debugging
|
168
|
+
@api_client.config.logger.debug "Calling API: RulesApi#get_rule ..."
|
169
|
+
end
|
170
|
+
|
171
|
+
# verify the required parameter 'rule_id' is set
|
172
|
+
fail "Missing the required parameter 'rule_id' when calling get_rule" if rule_id.nil?
|
173
|
+
|
174
|
+
# resource path
|
175
|
+
local_var_path = "/rules/{ruleId}".sub('{format}','json').sub('{' + 'ruleId' + '}', rule_id.to_s)
|
176
|
+
|
177
|
+
# query parameters
|
178
|
+
query_params = {}
|
179
|
+
|
180
|
+
# header parameters
|
181
|
+
header_params = {}
|
182
|
+
|
183
|
+
# HTTP header 'Accept' (if needed)
|
184
|
+
_header_accept = ['application/json']
|
185
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
186
|
+
|
187
|
+
# HTTP header 'Content-Type'
|
188
|
+
_header_content_type = []
|
189
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
190
|
+
|
191
|
+
# form parameters
|
192
|
+
form_params = {}
|
193
|
+
|
194
|
+
# http body (model)
|
195
|
+
post_body = nil
|
196
|
+
|
197
|
+
auth_names = ['artikcloud_oauth']
|
198
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
199
|
+
:header_params => header_params,
|
200
|
+
:query_params => query_params,
|
201
|
+
:form_params => form_params,
|
202
|
+
:body => post_body,
|
203
|
+
:auth_names => auth_names,
|
204
|
+
:return_type => 'RuleEnvelope')
|
205
|
+
if @api_client.config.debugging
|
206
|
+
@api_client.config.logger.debug "API called: RulesApi#get_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
207
|
+
end
|
208
|
+
return data, status_code, headers
|
209
|
+
end
|
210
|
+
|
211
|
+
# Update Rule
|
212
|
+
# Update an existing Rule
|
213
|
+
# @param rule_id Rule ID.
|
214
|
+
# @param rule_info Rule object that needs to be updated
|
215
|
+
# @param [Hash] opts the optional parameters
|
216
|
+
# @return [RuleEnvelope]
|
217
|
+
def update_rule(rule_id, rule_info, opts = {})
|
218
|
+
data, status_code, headers = update_rule_with_http_info(rule_id, rule_info, opts)
|
219
|
+
return data
|
220
|
+
end
|
221
|
+
|
222
|
+
# Update Rule
|
223
|
+
# Update an existing Rule
|
224
|
+
# @param rule_id Rule ID.
|
225
|
+
# @param rule_info Rule object that needs to be updated
|
226
|
+
# @param [Hash] opts the optional parameters
|
227
|
+
# @return [Array<(RuleEnvelope, Fixnum, Hash)>] RuleEnvelope data, response status code and response headers
|
228
|
+
def update_rule_with_http_info(rule_id, rule_info, opts = {})
|
229
|
+
if @api_client.config.debugging
|
230
|
+
@api_client.config.logger.debug "Calling API: RulesApi#update_rule ..."
|
231
|
+
end
|
232
|
+
|
233
|
+
# verify the required parameter 'rule_id' is set
|
234
|
+
fail "Missing the required parameter 'rule_id' when calling update_rule" if rule_id.nil?
|
235
|
+
|
236
|
+
# verify the required parameter 'rule_info' is set
|
237
|
+
fail "Missing the required parameter 'rule_info' when calling update_rule" if rule_info.nil?
|
238
|
+
|
239
|
+
# resource path
|
240
|
+
local_var_path = "/rules/{ruleId}".sub('{format}','json').sub('{' + 'ruleId' + '}', rule_id.to_s)
|
241
|
+
|
242
|
+
# query parameters
|
243
|
+
query_params = {}
|
244
|
+
|
245
|
+
# header parameters
|
246
|
+
header_params = {}
|
247
|
+
|
248
|
+
# HTTP header 'Accept' (if needed)
|
249
|
+
_header_accept = ['application/json']
|
250
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
251
|
+
|
252
|
+
# HTTP header 'Content-Type'
|
253
|
+
_header_content_type = []
|
254
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
255
|
+
|
256
|
+
# form parameters
|
257
|
+
form_params = {}
|
258
|
+
|
259
|
+
# http body (model)
|
260
|
+
post_body = @api_client.object_to_http_body(rule_info)
|
261
|
+
|
262
|
+
auth_names = ['artikcloud_oauth']
|
263
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
264
|
+
:header_params => header_params,
|
265
|
+
:query_params => query_params,
|
266
|
+
:form_params => form_params,
|
267
|
+
:body => post_body,
|
268
|
+
:auth_names => auth_names,
|
269
|
+
:return_type => 'RuleEnvelope')
|
270
|
+
if @api_client.config.debugging
|
271
|
+
@api_client.config.logger.debug "API called: RulesApi#update_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
272
|
+
end
|
273
|
+
return data, status_code, headers
|
274
|
+
end
|
275
|
+
end
|
276
|
+
end
|
@@ -0,0 +1,209 @@
|
|
1
|
+
=begin
|
2
|
+
ARTIK Cloud API
|
3
|
+
|
4
|
+
OpenAPI spec version: 2.0.0
|
5
|
+
|
6
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
7
|
+
|
8
|
+
License: MIT
|
9
|
+
http://en.wikipedia.org/wiki/MIT_License
|
10
|
+
|
11
|
+
Terms of Service: http://www.samsung.com/global/business/mobile/info/terms-and-conditions.html
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
require "uri"
|
16
|
+
|
17
|
+
module ArtikCloud
|
18
|
+
class TagsApi
|
19
|
+
attr_accessor :api_client
|
20
|
+
|
21
|
+
def initialize(api_client = ApiClient.default)
|
22
|
+
@api_client = api_client
|
23
|
+
end
|
24
|
+
|
25
|
+
# Get all categories
|
26
|
+
# Get all tags marked as categories
|
27
|
+
# @param [Hash] opts the optional parameters
|
28
|
+
# @return [TagsEnvelope]
|
29
|
+
def get_tag_categories(opts = {})
|
30
|
+
data, status_code, headers = get_tag_categories_with_http_info(opts)
|
31
|
+
return data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Get all categories
|
35
|
+
# Get all tags marked as categories
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(TagsEnvelope, Fixnum, Hash)>] TagsEnvelope data, response status code and response headers
|
38
|
+
def get_tag_categories_with_http_info(opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug "Calling API: TagsApi#get_tag_categories ..."
|
41
|
+
end
|
42
|
+
|
43
|
+
# resource path
|
44
|
+
local_var_path = "/tags/categories".sub('{format}','json')
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = {}
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = {}
|
51
|
+
|
52
|
+
# HTTP header 'Accept' (if needed)
|
53
|
+
_header_accept = ['application/json']
|
54
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
55
|
+
|
56
|
+
# HTTP header 'Content-Type'
|
57
|
+
_header_content_type = []
|
58
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
59
|
+
|
60
|
+
# form parameters
|
61
|
+
form_params = {}
|
62
|
+
|
63
|
+
# http body (model)
|
64
|
+
post_body = nil
|
65
|
+
|
66
|
+
auth_names = ['artikcloud_oauth']
|
67
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
68
|
+
:header_params => header_params,
|
69
|
+
:query_params => query_params,
|
70
|
+
:form_params => form_params,
|
71
|
+
:body => post_body,
|
72
|
+
:auth_names => auth_names,
|
73
|
+
:return_type => 'TagsEnvelope')
|
74
|
+
if @api_client.config.debugging
|
75
|
+
@api_client.config.logger.debug "API called: TagsApi#get_tag_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
76
|
+
end
|
77
|
+
return data, status_code, headers
|
78
|
+
end
|
79
|
+
|
80
|
+
# Get tag suggestions
|
81
|
+
# Get tag suggestions for applications, device types that have been most used with a group of tags.
|
82
|
+
# @param [Hash] opts the optional parameters
|
83
|
+
# @option opts [String] :entity_type Entity type name.
|
84
|
+
# @option opts [String] :tags Comma separated list of tags.
|
85
|
+
# @option opts [String] :name Name of tags used for type ahead.
|
86
|
+
# @option opts [Integer] :count Number of results to return. Max 10.
|
87
|
+
# @return [TagsEnvelope]
|
88
|
+
def get_tag_suggestions(opts = {})
|
89
|
+
data, status_code, headers = get_tag_suggestions_with_http_info(opts)
|
90
|
+
return data
|
91
|
+
end
|
92
|
+
|
93
|
+
# Get tag suggestions
|
94
|
+
# Get tag suggestions for applications, device types that have been most used with a group of tags.
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @option opts [String] :entity_type Entity type name.
|
97
|
+
# @option opts [String] :tags Comma separated list of tags.
|
98
|
+
# @option opts [String] :name Name of tags used for type ahead.
|
99
|
+
# @option opts [Integer] :count Number of results to return. Max 10.
|
100
|
+
# @return [Array<(TagsEnvelope, Fixnum, Hash)>] TagsEnvelope data, response status code and response headers
|
101
|
+
def get_tag_suggestions_with_http_info(opts = {})
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug "Calling API: TagsApi#get_tag_suggestions ..."
|
104
|
+
end
|
105
|
+
|
106
|
+
if opts[:'entity_type'] && !['TAG', 'APPLICATION', 'DEVICE_TYPE'].include?(opts[:'entity_type'])
|
107
|
+
fail 'invalid value for "entity_type", must be one of TAG, APPLICATION, DEVICE_TYPE'
|
108
|
+
end
|
109
|
+
|
110
|
+
# resource path
|
111
|
+
local_var_path = "/tags/suggestions".sub('{format}','json')
|
112
|
+
|
113
|
+
# query parameters
|
114
|
+
query_params = {}
|
115
|
+
query_params[:'entity_type'] = opts[:'entity_type'] if opts[:'entity_type']
|
116
|
+
query_params[:'tags'] = opts[:'tags'] if opts[:'tags']
|
117
|
+
query_params[:'name'] = opts[:'name'] if opts[:'name']
|
118
|
+
query_params[:'count'] = opts[:'count'] if opts[:'count']
|
119
|
+
|
120
|
+
# header parameters
|
121
|
+
header_params = {}
|
122
|
+
|
123
|
+
# HTTP header 'Accept' (if needed)
|
124
|
+
_header_accept = ['application/json']
|
125
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
126
|
+
|
127
|
+
# HTTP header 'Content-Type'
|
128
|
+
_header_content_type = []
|
129
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
130
|
+
|
131
|
+
# form parameters
|
132
|
+
form_params = {}
|
133
|
+
|
134
|
+
# http body (model)
|
135
|
+
post_body = nil
|
136
|
+
|
137
|
+
auth_names = ['artikcloud_oauth']
|
138
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
139
|
+
:header_params => header_params,
|
140
|
+
:query_params => query_params,
|
141
|
+
:form_params => form_params,
|
142
|
+
:body => post_body,
|
143
|
+
:auth_names => auth_names,
|
144
|
+
:return_type => 'TagsEnvelope')
|
145
|
+
if @api_client.config.debugging
|
146
|
+
@api_client.config.logger.debug "API called: TagsApi#get_tag_suggestions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
147
|
+
end
|
148
|
+
return data, status_code, headers
|
149
|
+
end
|
150
|
+
|
151
|
+
# Get all tags of categories
|
152
|
+
# Get all tags related to the list of categories
|
153
|
+
# @param [Hash] opts the optional parameters
|
154
|
+
# @option opts [String] :categories Comma separated list of categories.
|
155
|
+
# @return [TagsEnvelope]
|
156
|
+
def get_tags_by_categories(opts = {})
|
157
|
+
data, status_code, headers = get_tags_by_categories_with_http_info(opts)
|
158
|
+
return data
|
159
|
+
end
|
160
|
+
|
161
|
+
# Get all tags of categories
|
162
|
+
# Get all tags related to the list of categories
|
163
|
+
# @param [Hash] opts the optional parameters
|
164
|
+
# @option opts [String] :categories Comma separated list of categories.
|
165
|
+
# @return [Array<(TagsEnvelope, Fixnum, Hash)>] TagsEnvelope data, response status code and response headers
|
166
|
+
def get_tags_by_categories_with_http_info(opts = {})
|
167
|
+
if @api_client.config.debugging
|
168
|
+
@api_client.config.logger.debug "Calling API: TagsApi#get_tags_by_categories ..."
|
169
|
+
end
|
170
|
+
|
171
|
+
# resource path
|
172
|
+
local_var_path = "/tags".sub('{format}','json')
|
173
|
+
|
174
|
+
# query parameters
|
175
|
+
query_params = {}
|
176
|
+
query_params[:'categories'] = opts[:'categories'] if opts[:'categories']
|
177
|
+
|
178
|
+
# header parameters
|
179
|
+
header_params = {}
|
180
|
+
|
181
|
+
# HTTP header 'Accept' (if needed)
|
182
|
+
_header_accept = ['application/json']
|
183
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
184
|
+
|
185
|
+
# HTTP header 'Content-Type'
|
186
|
+
_header_content_type = []
|
187
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
188
|
+
|
189
|
+
# form parameters
|
190
|
+
form_params = {}
|
191
|
+
|
192
|
+
# http body (model)
|
193
|
+
post_body = nil
|
194
|
+
|
195
|
+
auth_names = ['artikcloud_oauth']
|
196
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
197
|
+
:header_params => header_params,
|
198
|
+
:query_params => query_params,
|
199
|
+
:form_params => form_params,
|
200
|
+
:body => post_body,
|
201
|
+
:auth_names => auth_names,
|
202
|
+
:return_type => 'TagsEnvelope')
|
203
|
+
if @api_client.config.debugging
|
204
|
+
@api_client.config.logger.debug "API called: TagsApi#get_tags_by_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
205
|
+
end
|
206
|
+
return data, status_code, headers
|
207
|
+
end
|
208
|
+
end
|
209
|
+
end
|
@@ -0,0 +1,152 @@
|
|
1
|
+
=begin
|
2
|
+
ARTIK Cloud API
|
3
|
+
|
4
|
+
OpenAPI spec version: 2.0.0
|
5
|
+
|
6
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
7
|
+
|
8
|
+
License: MIT
|
9
|
+
http://en.wikipedia.org/wiki/MIT_License
|
10
|
+
|
11
|
+
Terms of Service: http://www.samsung.com/global/business/mobile/info/terms-and-conditions.html
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
require "uri"
|
16
|
+
|
17
|
+
module ArtikCloud
|
18
|
+
class TokensApi
|
19
|
+
attr_accessor :api_client
|
20
|
+
|
21
|
+
def initialize(api_client = ApiClient.default)
|
22
|
+
@api_client = api_client
|
23
|
+
end
|
24
|
+
|
25
|
+
# Check Token
|
26
|
+
# Check Token
|
27
|
+
# @param token_info Token object to be checked
|
28
|
+
# @param [Hash] opts the optional parameters
|
29
|
+
# @return [CheckTokenResponse]
|
30
|
+
def check_token(token_info, opts = {})
|
31
|
+
data, status_code, headers = check_token_with_http_info(token_info, opts)
|
32
|
+
return data
|
33
|
+
end
|
34
|
+
|
35
|
+
# Check Token
|
36
|
+
# Check Token
|
37
|
+
# @param token_info Token object to be checked
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [Array<(CheckTokenResponse, Fixnum, Hash)>] CheckTokenResponse data, response status code and response headers
|
40
|
+
def check_token_with_http_info(token_info, opts = {})
|
41
|
+
if @api_client.config.debugging
|
42
|
+
@api_client.config.logger.debug "Calling API: TokensApi#check_token ..."
|
43
|
+
end
|
44
|
+
|
45
|
+
# verify the required parameter 'token_info' is set
|
46
|
+
fail "Missing the required parameter 'token_info' when calling check_token" if token_info.nil?
|
47
|
+
|
48
|
+
# resource path
|
49
|
+
local_var_path = "/checkToken".sub('{format}','json')
|
50
|
+
|
51
|
+
# query parameters
|
52
|
+
query_params = {}
|
53
|
+
|
54
|
+
# header parameters
|
55
|
+
header_params = {}
|
56
|
+
|
57
|
+
# HTTP header 'Accept' (if needed)
|
58
|
+
_header_accept = ['application/json']
|
59
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
60
|
+
|
61
|
+
# HTTP header 'Content-Type'
|
62
|
+
_header_content_type = []
|
63
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
64
|
+
|
65
|
+
# form parameters
|
66
|
+
form_params = {}
|
67
|
+
|
68
|
+
# http body (model)
|
69
|
+
post_body = @api_client.object_to_http_body(token_info)
|
70
|
+
|
71
|
+
auth_names = ['artikcloud_oauth']
|
72
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
73
|
+
:header_params => header_params,
|
74
|
+
:query_params => query_params,
|
75
|
+
:form_params => form_params,
|
76
|
+
:body => post_body,
|
77
|
+
:auth_names => auth_names,
|
78
|
+
:return_type => 'CheckTokenResponse')
|
79
|
+
if @api_client.config.debugging
|
80
|
+
@api_client.config.logger.debug "API called: TokensApi#check_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
81
|
+
end
|
82
|
+
return data, status_code, headers
|
83
|
+
end
|
84
|
+
|
85
|
+
# Refresh Token
|
86
|
+
# Refresh Token
|
87
|
+
# @param grant_type Grant Type.
|
88
|
+
# @param refresh_token Refresh Token.
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @return [RefreshTokenResponse]
|
91
|
+
def refresh_token(grant_type, refresh_token, opts = {})
|
92
|
+
data, status_code, headers = refresh_token_with_http_info(grant_type, refresh_token, opts)
|
93
|
+
return data
|
94
|
+
end
|
95
|
+
|
96
|
+
# Refresh Token
|
97
|
+
# Refresh Token
|
98
|
+
# @param grant_type Grant Type.
|
99
|
+
# @param refresh_token Refresh Token.
|
100
|
+
# @param [Hash] opts the optional parameters
|
101
|
+
# @return [Array<(RefreshTokenResponse, Fixnum, Hash)>] RefreshTokenResponse data, response status code and response headers
|
102
|
+
def refresh_token_with_http_info(grant_type, refresh_token, opts = {})
|
103
|
+
if @api_client.config.debugging
|
104
|
+
@api_client.config.logger.debug "Calling API: TokensApi#refresh_token ..."
|
105
|
+
end
|
106
|
+
|
107
|
+
# verify the required parameter 'grant_type' is set
|
108
|
+
fail "Missing the required parameter 'grant_type' when calling refresh_token" if grant_type.nil?
|
109
|
+
|
110
|
+
# verify the required parameter 'refresh_token' is set
|
111
|
+
fail "Missing the required parameter 'refresh_token' when calling refresh_token" if refresh_token.nil?
|
112
|
+
|
113
|
+
# resource path
|
114
|
+
local_var_path = "/token".sub('{format}','json')
|
115
|
+
|
116
|
+
# query parameters
|
117
|
+
query_params = {}
|
118
|
+
|
119
|
+
# header parameters
|
120
|
+
header_params = {}
|
121
|
+
|
122
|
+
# HTTP header 'Accept' (if needed)
|
123
|
+
_header_accept = ['application/json']
|
124
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
125
|
+
|
126
|
+
# HTTP header 'Content-Type'
|
127
|
+
_header_content_type = ['application/x-www-form-urlencoded']
|
128
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
129
|
+
|
130
|
+
# form parameters
|
131
|
+
form_params = {}
|
132
|
+
form_params["grant_type"] = grant_type
|
133
|
+
form_params["refresh_token"] = refresh_token
|
134
|
+
|
135
|
+
# http body (model)
|
136
|
+
post_body = nil
|
137
|
+
|
138
|
+
auth_names = ['artikcloud_oauth']
|
139
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
140
|
+
:header_params => header_params,
|
141
|
+
:query_params => query_params,
|
142
|
+
:form_params => form_params,
|
143
|
+
:body => post_body,
|
144
|
+
:auth_names => auth_names,
|
145
|
+
:return_type => 'RefreshTokenResponse')
|
146
|
+
if @api_client.config.debugging
|
147
|
+
@api_client.config.logger.debug "API called: TokensApi#refresh_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
148
|
+
end
|
149
|
+
return data, status_code, headers
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|