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.
- 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
|
|
|
@@ -23,30 +32,28 @@ module ArtikCloud
|
|
|
23
32
|
end
|
|
24
33
|
|
|
25
34
|
# Check Token
|
|
26
|
-
# Check Token
|
|
35
|
+
# (Deprecated) Check Token. See tokenInfo
|
|
27
36
|
# @param token_info Token object to be checked
|
|
28
37
|
# @param [Hash] opts the optional parameters
|
|
29
38
|
# @return [CheckTokenResponse]
|
|
30
39
|
def check_token(token_info, opts = {})
|
|
31
|
-
data,
|
|
40
|
+
data, _status_code, _headers = check_token_with_http_info(token_info, opts)
|
|
32
41
|
return data
|
|
33
42
|
end
|
|
34
43
|
|
|
35
44
|
# Check Token
|
|
36
|
-
# Check Token
|
|
45
|
+
# (Deprecated) Check Token. See tokenInfo
|
|
37
46
|
# @param token_info Token object to be checked
|
|
38
47
|
# @param [Hash] opts the optional parameters
|
|
39
48
|
# @return [Array<(CheckTokenResponse, Fixnum, Hash)>] CheckTokenResponse data, response status code and response headers
|
|
40
49
|
def check_token_with_http_info(token_info, opts = {})
|
|
41
50
|
if @api_client.config.debugging
|
|
42
|
-
@api_client.config.logger.debug "Calling API: TokensApi
|
|
51
|
+
@api_client.config.logger.debug "Calling API: TokensApi.check_token ..."
|
|
43
52
|
end
|
|
44
|
-
|
|
45
53
|
# 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
|
-
|
|
54
|
+
fail ArgumentError, "Missing the required parameter 'token_info' when calling TokensApi.check_token" if token_info.nil?
|
|
48
55
|
# resource path
|
|
49
|
-
local_var_path = "/checkToken".sub('{format}','json')
|
|
56
|
+
local_var_path = "/accounts/checkToken".sub('{format}','json')
|
|
50
57
|
|
|
51
58
|
# query parameters
|
|
52
59
|
query_params = {}
|
|
@@ -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(token_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,
|
|
@@ -89,7 +95,7 @@ module ArtikCloud
|
|
|
89
95
|
# @param [Hash] opts the optional parameters
|
|
90
96
|
# @return [RefreshTokenResponse]
|
|
91
97
|
def refresh_token(grant_type, refresh_token, opts = {})
|
|
92
|
-
data,
|
|
98
|
+
data, _status_code, _headers = refresh_token_with_http_info(grant_type, refresh_token, opts)
|
|
93
99
|
return data
|
|
94
100
|
end
|
|
95
101
|
|
|
@@ -101,17 +107,14 @@ module ArtikCloud
|
|
|
101
107
|
# @return [Array<(RefreshTokenResponse, Fixnum, Hash)>] RefreshTokenResponse data, response status code and response headers
|
|
102
108
|
def refresh_token_with_http_info(grant_type, refresh_token, opts = {})
|
|
103
109
|
if @api_client.config.debugging
|
|
104
|
-
@api_client.config.logger.debug "Calling API: TokensApi
|
|
110
|
+
@api_client.config.logger.debug "Calling API: TokensApi.refresh_token ..."
|
|
105
111
|
end
|
|
106
|
-
|
|
107
112
|
# 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
|
-
|
|
113
|
+
fail ArgumentError, "Missing the required parameter 'grant_type' when calling TokensApi.refresh_token" if grant_type.nil?
|
|
110
114
|
# 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
|
-
|
|
115
|
+
fail ArgumentError, "Missing the required parameter 'refresh_token' when calling TokensApi.refresh_token" if refresh_token.nil?
|
|
113
116
|
# resource path
|
|
114
|
-
local_var_path = "/token".sub('{format}','json')
|
|
117
|
+
local_var_path = "/accounts/token".sub('{format}','json')
|
|
115
118
|
|
|
116
119
|
# query parameters
|
|
117
120
|
query_params = {}
|
|
@@ -120,12 +123,12 @@ module ArtikCloud
|
|
|
120
123
|
header_params = {}
|
|
121
124
|
|
|
122
125
|
# HTTP header 'Accept' (if needed)
|
|
123
|
-
|
|
124
|
-
|
|
126
|
+
local_header_accept = ['application/json']
|
|
127
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
|
125
128
|
|
|
126
129
|
# HTTP header 'Content-Type'
|
|
127
|
-
|
|
128
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(
|
|
130
|
+
local_header_content_type = ['application/x-www-form-urlencoded']
|
|
131
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
|
129
132
|
|
|
130
133
|
# form parameters
|
|
131
134
|
form_params = {}
|
|
@@ -134,7 +137,6 @@ module ArtikCloud
|
|
|
134
137
|
|
|
135
138
|
# http body (model)
|
|
136
139
|
post_body = nil
|
|
137
|
-
|
|
138
140
|
auth_names = ['artikcloud_oauth']
|
|
139
141
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
140
142
|
:header_params => header_params,
|
|
@@ -148,5 +150,58 @@ module ArtikCloud
|
|
|
148
150
|
end
|
|
149
151
|
return data, status_code, headers
|
|
150
152
|
end
|
|
153
|
+
|
|
154
|
+
# Token Info
|
|
155
|
+
# Returns the Token Information
|
|
156
|
+
# @param [Hash] opts the optional parameters
|
|
157
|
+
# @return [TokenInfoSuccessResponse]
|
|
158
|
+
def token_info(opts = {})
|
|
159
|
+
data, _status_code, _headers = token_info_with_http_info(opts)
|
|
160
|
+
return data
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Token Info
|
|
164
|
+
# Returns the Token Information
|
|
165
|
+
# @param [Hash] opts the optional parameters
|
|
166
|
+
# @return [Array<(TokenInfoSuccessResponse, Fixnum, Hash)>] TokenInfoSuccessResponse data, response status code and response headers
|
|
167
|
+
def token_info_with_http_info(opts = {})
|
|
168
|
+
if @api_client.config.debugging
|
|
169
|
+
@api_client.config.logger.debug "Calling API: TokensApi.token_info ..."
|
|
170
|
+
end
|
|
171
|
+
# resource path
|
|
172
|
+
local_var_path = "/accounts/tokenInfo".sub('{format}','json')
|
|
173
|
+
|
|
174
|
+
# query parameters
|
|
175
|
+
query_params = {}
|
|
176
|
+
|
|
177
|
+
# header parameters
|
|
178
|
+
header_params = {}
|
|
179
|
+
|
|
180
|
+
# HTTP header 'Accept' (if needed)
|
|
181
|
+
local_header_accept = ['application/json']
|
|
182
|
+
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
|
183
|
+
|
|
184
|
+
# HTTP header 'Content-Type'
|
|
185
|
+
local_header_content_type = []
|
|
186
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
|
187
|
+
|
|
188
|
+
# form parameters
|
|
189
|
+
form_params = {}
|
|
190
|
+
|
|
191
|
+
# http body (model)
|
|
192
|
+
post_body = nil
|
|
193
|
+
auth_names = ['artikcloud_oauth']
|
|
194
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
195
|
+
:header_params => header_params,
|
|
196
|
+
:query_params => query_params,
|
|
197
|
+
:form_params => form_params,
|
|
198
|
+
:body => post_body,
|
|
199
|
+
:auth_names => auth_names,
|
|
200
|
+
:return_type => 'TokenInfoSuccessResponse')
|
|
201
|
+
if @api_client.config.debugging
|
|
202
|
+
@api_client.config.logger.debug "API called: TokensApi#token_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
203
|
+
end
|
|
204
|
+
return data, status_code, headers
|
|
205
|
+
end
|
|
151
206
|
end
|
|
152
207
|
end
|