artikcloud 2.0.8 → 2.1.0
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 +5 -2
- data/LICENSE +1 -1
- data/README.md +39 -4
- data/Rakefile +8 -0
- data/artikcloud.gemspec +5 -16
- data/docs/Device.md +2 -0
- data/docs/DeviceShareInfo.md +8 -0
- data/docs/DeviceSharing.md +11 -0
- data/docs/DeviceSharingArray.md +8 -0
- data/docs/DeviceSharingEnvelope.md +11 -0
- data/docs/DeviceSharingId.md +8 -0
- data/docs/DeviceStatus.md +9 -0
- data/docs/DeviceStatusBatch.md +11 -0
- data/docs/DeviceStatusData.md +12 -0
- data/docs/DeviceStatusPut.md +8 -0
- data/docs/DeviceStatusPutData.md +8 -0
- data/docs/DevicessharesApi.md +235 -0
- data/docs/DevicestatusApi.md +183 -0
- data/docs/NotifMessage.md +15 -0
- data/docs/NotifMessageArray.md +8 -0
- data/docs/NotifMessagesResponse.md +12 -0
- data/docs/Subscription.md +24 -0
- data/docs/SubscriptionArray.md +8 -0
- data/docs/SubscriptionEnvelope.md +8 -0
- data/docs/SubscriptionInfo.md +20 -0
- data/docs/SubscriptionsApi.md +342 -0
- data/docs/SubscriptionsEnvelope.md +11 -0
- data/docs/TaskParameters.md +2 -0
- data/docs/UpdateParameters.md +8 -0
- data/docs/UsersApi.md +67 -1
- data/docs/ValidationCallbackInfo.md +9 -0
- data/git_push.sh +0 -12
- data/lib/artikcloud.rb +24 -13
- data/lib/artikcloud/api/device_types_api.rb +7 -55
- data/lib/artikcloud/api/devices_api.rb +12 -66
- data/lib/artikcloud/api/devices_management_api.rb +16 -118
- data/lib/artikcloud/api/devicesshares_api.rb +244 -0
- data/lib/artikcloud/api/devicestatus_api.rb +190 -0
- data/lib/artikcloud/api/export_api.rb +5 -41
- data/lib/artikcloud/api/messages_api.rb +10 -76
- data/lib/artikcloud/api/registrations_api.rb +4 -34
- data/lib/artikcloud/api/rules_api.rb +5 -41
- data/lib/artikcloud/api/subscriptions_api.rb +346 -0
- data/lib/artikcloud/api/tags_api.rb +4 -34
- data/lib/artikcloud/api/tokens_api.rb +5 -33
- data/lib/artikcloud/api/users_api.rb +79 -67
- data/lib/artikcloud/api_client.rb +17 -20
- data/lib/artikcloud/api_error.rb +8 -18
- data/lib/artikcloud/configuration.rb +1 -13
- data/lib/artikcloud/models/ack_envelope.rb +4 -16
- data/lib/artikcloud/models/acknowledgement.rb +4 -16
- data/lib/artikcloud/models/action.rb +4 -16
- data/lib/artikcloud/models/action_array.rb +4 -16
- data/lib/artikcloud/models/action_details.rb +4 -16
- data/lib/artikcloud/models/action_details_array.rb +4 -16
- data/lib/artikcloud/models/action_in.rb +4 -16
- data/lib/artikcloud/models/action_out.rb +4 -16
- data/lib/artikcloud/models/actions.rb +4 -16
- data/lib/artikcloud/models/aggregate_data.rb +4 -16
- data/lib/artikcloud/models/aggregates_histogram_data.rb +4 -16
- data/lib/artikcloud/models/aggregates_histogram_response.rb +4 -16
- data/lib/artikcloud/models/aggregates_response.rb +4 -16
- data/lib/artikcloud/models/app_properties.rb +8 -16
- data/lib/artikcloud/models/check_token_message.rb +4 -16
- data/lib/artikcloud/models/check_token_response.rb +4 -16
- data/lib/artikcloud/models/device.rb +28 -20
- data/lib/artikcloud/models/device_array.rb +4 -16
- data/lib/artikcloud/models/device_envelope.rb +8 -16
- data/lib/artikcloud/models/device_reg_complete_request.rb +4 -16
- data/lib/artikcloud/models/device_reg_confirm_user_request.rb +4 -16
- data/lib/artikcloud/models/device_reg_confirm_user_response.rb +4 -16
- data/lib/artikcloud/models/device_reg_confirm_user_response_envelope.rb +4 -16
- data/lib/artikcloud/models/device_reg_status_response.rb +4 -16
- data/lib/artikcloud/models/device_reg_status_response_envelope.rb +4 -16
- data/lib/artikcloud/models/device_share_info.rb +188 -0
- data/lib/artikcloud/models/device_sharing.rb +218 -0
- data/lib/artikcloud/models/device_sharing_array.rb +189 -0
- data/lib/artikcloud/models/device_sharing_envelope.rb +214 -0
- data/lib/artikcloud/models/device_sharing_id.rb +188 -0
- data/lib/artikcloud/models/device_status.rb +196 -0
- data/lib/artikcloud/models/device_status_batch.rb +216 -0
- data/lib/artikcloud/models/device_status_data.rb +225 -0
- data/lib/artikcloud/models/device_status_put.rb +187 -0
- data/lib/artikcloud/models/device_status_put_data.rb +187 -0
- data/lib/artikcloud/models/device_task.rb +4 -16
- data/lib/artikcloud/models/device_task_update_request.rb +4 -16
- data/lib/artikcloud/models/device_task_update_response.rb +4 -16
- data/lib/artikcloud/models/device_token.rb +20 -16
- data/lib/artikcloud/models/device_token_envelope.rb +8 -16
- data/lib/artikcloud/models/device_type.rb +4 -16
- data/lib/artikcloud/models/device_type_array.rb +4 -16
- data/lib/artikcloud/models/device_type_envelope.rb +8 -16
- data/lib/artikcloud/models/device_type_info.rb +4 -16
- data/lib/artikcloud/models/device_type_info_envelope.rb +4 -16
- data/lib/artikcloud/models/device_types_envelope.rb +16 -16
- data/lib/artikcloud/models/device_types_info.rb +4 -16
- data/lib/artikcloud/models/device_types_info_envelope.rb +4 -16
- data/lib/artikcloud/models/devices_envelope.rb +16 -16
- data/lib/artikcloud/models/error_envelope.rb +4 -16
- data/lib/artikcloud/models/event_feed_data.rb +4 -16
- data/lib/artikcloud/models/export_data.rb +4 -16
- data/lib/artikcloud/models/export_data_array.rb +4 -16
- data/lib/artikcloud/models/export_history_response.rb +4 -16
- data/lib/artikcloud/models/export_normalized_messages_response.rb +4 -16
- data/lib/artikcloud/models/export_request.rb +4 -16
- data/lib/artikcloud/models/export_request_data.rb +4 -16
- data/lib/artikcloud/models/export_request_info.rb +4 -16
- data/lib/artikcloud/models/export_request_response.rb +4 -16
- data/lib/artikcloud/models/export_response.rb +4 -16
- data/lib/artikcloud/models/export_status_response.rb +4 -16
- data/lib/artikcloud/models/field_path.rb +4 -16
- data/lib/artikcloud/models/field_presence.rb +8 -16
- data/lib/artikcloud/models/field_presence_envelope.rb +32 -16
- data/lib/artikcloud/models/fields_actions.rb +4 -16
- data/lib/artikcloud/models/manifest_properties.rb +8 -16
- data/lib/artikcloud/models/manifest_properties_envelope.rb +8 -16
- data/lib/artikcloud/models/manifest_versions.rb +8 -16
- data/lib/artikcloud/models/manifest_versions_envelope.rb +8 -16
- data/lib/artikcloud/models/message.rb +4 -16
- data/lib/artikcloud/models/message_action.rb +4 -16
- data/lib/artikcloud/models/message_id.rb +4 -16
- data/lib/artikcloud/models/message_id_envelope.rb +4 -16
- data/lib/artikcloud/models/message_in.rb +4 -16
- data/lib/artikcloud/models/message_out.rb +4 -16
- data/lib/artikcloud/models/metadata_envelope.rb +4 -16
- data/lib/artikcloud/models/metadata_properties_envelope.rb +4 -16
- data/lib/artikcloud/models/metadata_query_envelope.rb +4 -16
- data/lib/artikcloud/models/non_empty_string.rb +4 -16
- data/lib/artikcloud/models/normalized_action.rb +36 -16
- data/lib/artikcloud/models/normalized_actions_envelope.rb +16 -16
- data/lib/artikcloud/models/normalized_message.rb +36 -16
- data/lib/artikcloud/models/normalized_messages_envelope.rb +16 -16
- data/lib/artikcloud/models/notif_message.rb +252 -0
- data/lib/artikcloud/models/notif_message_array.rb +189 -0
- data/lib/artikcloud/models/notif_messages_response.rb +223 -0
- data/lib/artikcloud/models/output_rule.rb +4 -16
- data/lib/artikcloud/models/presence_envelope.rb +4 -16
- data/lib/artikcloud/models/presence_model.rb +4 -16
- data/lib/artikcloud/models/properties_envelope.rb +8 -16
- data/lib/artikcloud/models/refresh_token_response.rb +4 -16
- data/lib/artikcloud/models/register_message.rb +4 -16
- data/lib/artikcloud/models/rule_array.rb +4 -16
- data/lib/artikcloud/models/rule_creation_info.rb +4 -16
- data/lib/artikcloud/models/rule_envelope.rb +4 -16
- data/lib/artikcloud/models/rule_error.rb +4 -16
- data/lib/artikcloud/models/rule_update_info.rb +4 -16
- data/lib/artikcloud/models/rule_warning_output.rb +4 -16
- data/lib/artikcloud/models/rules_envelope.rb +4 -16
- data/lib/artikcloud/models/snapshot_response.rb +4 -16
- data/lib/artikcloud/models/snapshot_responses.rb +4 -16
- data/lib/artikcloud/models/snapshots_response_envelope.rb +4 -16
- data/lib/artikcloud/models/subscription.rb +348 -0
- data/lib/artikcloud/models/subscription_array.rb +189 -0
- data/lib/artikcloud/models/subscription_envelope.rb +187 -0
- data/lib/artikcloud/models/subscription_info.rb +308 -0
- data/lib/artikcloud/models/subscriptions_envelope.rb +214 -0
- data/lib/artikcloud/models/tag.rb +4 -16
- data/lib/artikcloud/models/tag_array.rb +4 -16
- data/lib/artikcloud/models/tags_envelope.rb +4 -16
- data/lib/artikcloud/models/task.rb +4 -16
- data/lib/artikcloud/models/task_by_did.rb +4 -16
- data/lib/artikcloud/models/task_by_did_list.rb +4 -16
- data/lib/artikcloud/models/task_by_did_list_envelope.rb +4 -16
- data/lib/artikcloud/models/task_envelope.rb +4 -16
- data/lib/artikcloud/models/task_history.rb +4 -16
- data/lib/artikcloud/models/task_history_list.rb +4 -16
- data/lib/artikcloud/models/task_list.rb +4 -16
- data/lib/artikcloud/models/task_list_envelope.rb +4 -16
- data/lib/artikcloud/models/task_parameters.rb +25 -17
- data/lib/artikcloud/models/task_request.rb +4 -16
- data/lib/artikcloud/models/task_status.rb +4 -16
- data/lib/artikcloud/models/task_status_counts.rb +4 -16
- data/lib/artikcloud/models/task_statuses.rb +4 -16
- data/lib/artikcloud/models/task_statuses_envelope.rb +4 -16
- data/lib/artikcloud/models/task_statuses_history_envelope.rb +4 -16
- data/lib/artikcloud/models/task_update_request.rb +4 -16
- data/lib/artikcloud/models/task_update_response.rb +4 -16
- data/lib/artikcloud/models/tasks_status_counts.rb +4 -16
- data/lib/artikcloud/models/token.rb +4 -16
- data/lib/artikcloud/models/token_info.rb +4 -16
- data/lib/artikcloud/models/token_info_success_response.rb +4 -16
- data/lib/artikcloud/models/token_request.rb +4 -16
- data/lib/artikcloud/models/token_response.rb +4 -16
- data/lib/artikcloud/models/unregister_device_response.rb +4 -16
- data/lib/artikcloud/models/unregister_device_response_envelope.rb +4 -16
- data/lib/artikcloud/models/update_parameters.rb +188 -0
- data/lib/artikcloud/models/user.rb +28 -16
- data/lib/artikcloud/models/user_envelope.rb +8 -16
- data/lib/artikcloud/models/validation_callback_info.rb +198 -0
- data/lib/artikcloud/models/web_socket_error.rb +4 -16
- data/lib/artikcloud/version.rb +2 -14
- data/pom.xml +1 -1
- data/spec/api/devicesshares_api_spec.rb +87 -0
- data/spec/api/devicestatus_api_spec.rb +75 -0
- data/spec/api/subscriptions_api_spec.rb +112 -0
- metadata +58 -26
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#ARTIK Cloud API
|
|
3
3
|
|
|
4
|
-
#No
|
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
5
5
|
|
|
6
6
|
OpenAPI spec version: 2.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
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
|
|
15
|
-
|
|
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.
|
|
21
|
-
|
|
22
10
|
=end
|
|
23
11
|
|
|
24
12
|
require "uri"
|
|
@@ -65,14 +53,8 @@ module ArtikCloud
|
|
|
65
53
|
|
|
66
54
|
# header parameters
|
|
67
55
|
header_params = {}
|
|
68
|
-
|
|
69
56
|
# HTTP header 'Accept' (if needed)
|
|
70
|
-
|
|
71
|
-
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
|
72
|
-
|
|
73
|
-
# HTTP header 'Content-Type'
|
|
74
|
-
local_header_content_type = []
|
|
75
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
|
57
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
76
58
|
|
|
77
59
|
# form parameters
|
|
78
60
|
form_params = {}
|
|
@@ -122,14 +104,8 @@ module ArtikCloud
|
|
|
122
104
|
|
|
123
105
|
# header parameters
|
|
124
106
|
header_params = {}
|
|
125
|
-
|
|
126
107
|
# HTTP header 'Accept' (if needed)
|
|
127
|
-
|
|
128
|
-
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
|
129
|
-
|
|
130
|
-
# HTTP header 'Content-Type'
|
|
131
|
-
local_header_content_type = []
|
|
132
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
|
108
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
133
109
|
|
|
134
110
|
# form parameters
|
|
135
111
|
form_params = {}
|
|
@@ -179,14 +155,8 @@ module ArtikCloud
|
|
|
179
155
|
|
|
180
156
|
# header parameters
|
|
181
157
|
header_params = {}
|
|
182
|
-
|
|
183
158
|
# HTTP header 'Accept' (if needed)
|
|
184
|
-
|
|
185
|
-
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
|
186
|
-
|
|
187
|
-
# HTTP header 'Content-Type'
|
|
188
|
-
local_header_content_type = []
|
|
189
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
|
159
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
190
160
|
|
|
191
161
|
# form parameters
|
|
192
162
|
form_params = {}
|
|
@@ -240,14 +210,8 @@ module ArtikCloud
|
|
|
240
210
|
|
|
241
211
|
# header parameters
|
|
242
212
|
header_params = {}
|
|
243
|
-
|
|
244
213
|
# HTTP header 'Accept' (if needed)
|
|
245
|
-
|
|
246
|
-
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
|
247
|
-
|
|
248
|
-
# HTTP header 'Content-Type'
|
|
249
|
-
local_header_content_type = []
|
|
250
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
|
214
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
251
215
|
|
|
252
216
|
# form parameters
|
|
253
217
|
form_params = {}
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#ARTIK Cloud API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 2.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require "uri"
|
|
13
|
+
|
|
14
|
+
module ArtikCloud
|
|
15
|
+
class SubscriptionsApi
|
|
16
|
+
attr_accessor :api_client
|
|
17
|
+
|
|
18
|
+
def initialize(api_client = ApiClient.default)
|
|
19
|
+
@api_client = api_client
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# Create Subscription
|
|
23
|
+
# Create Subscription
|
|
24
|
+
# @param subscription_info Subscription details
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [SubscriptionEnvelope]
|
|
27
|
+
def create_subscription(subscription_info, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_subscription_with_http_info(subscription_info, opts)
|
|
29
|
+
return data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Create Subscription
|
|
33
|
+
# Create Subscription
|
|
34
|
+
# @param subscription_info Subscription details
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(SubscriptionEnvelope, Fixnum, Hash)>] SubscriptionEnvelope data, response status code and response headers
|
|
37
|
+
def create_subscription_with_http_info(subscription_info, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug "Calling API: SubscriptionsApi.create_subscription ..."
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'subscription_info' is set
|
|
42
|
+
fail ArgumentError, "Missing the required parameter 'subscription_info' when calling SubscriptionsApi.create_subscription" if subscription_info.nil?
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = "/subscriptions".sub('{format}','json')
|
|
45
|
+
|
|
46
|
+
# query parameters
|
|
47
|
+
query_params = {}
|
|
48
|
+
|
|
49
|
+
# header parameters
|
|
50
|
+
header_params = {}
|
|
51
|
+
# HTTP header 'Accept' (if needed)
|
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
53
|
+
|
|
54
|
+
# form parameters
|
|
55
|
+
form_params = {}
|
|
56
|
+
|
|
57
|
+
# http body (model)
|
|
58
|
+
post_body = @api_client.object_to_http_body(subscription_info)
|
|
59
|
+
auth_names = ['artikcloud_oauth']
|
|
60
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
61
|
+
:header_params => header_params,
|
|
62
|
+
:query_params => query_params,
|
|
63
|
+
:form_params => form_params,
|
|
64
|
+
:body => post_body,
|
|
65
|
+
:auth_names => auth_names,
|
|
66
|
+
:return_type => 'SubscriptionEnvelope')
|
|
67
|
+
if @api_client.config.debugging
|
|
68
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#create_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
69
|
+
end
|
|
70
|
+
return data, status_code, headers
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Delete Subscription
|
|
74
|
+
# Delete Subscription
|
|
75
|
+
# @param sub_id Subscription ID.
|
|
76
|
+
# @param [Hash] opts the optional parameters
|
|
77
|
+
# @return [SubscriptionEnvelope]
|
|
78
|
+
def delete_subscription(sub_id, opts = {})
|
|
79
|
+
data, _status_code, _headers = delete_subscription_with_http_info(sub_id, opts)
|
|
80
|
+
return data
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Delete Subscription
|
|
84
|
+
# Delete Subscription
|
|
85
|
+
# @param sub_id Subscription ID.
|
|
86
|
+
# @param [Hash] opts the optional parameters
|
|
87
|
+
# @return [Array<(SubscriptionEnvelope, Fixnum, Hash)>] SubscriptionEnvelope data, response status code and response headers
|
|
88
|
+
def delete_subscription_with_http_info(sub_id, opts = {})
|
|
89
|
+
if @api_client.config.debugging
|
|
90
|
+
@api_client.config.logger.debug "Calling API: SubscriptionsApi.delete_subscription ..."
|
|
91
|
+
end
|
|
92
|
+
# verify the required parameter 'sub_id' is set
|
|
93
|
+
fail ArgumentError, "Missing the required parameter 'sub_id' when calling SubscriptionsApi.delete_subscription" if sub_id.nil?
|
|
94
|
+
# resource path
|
|
95
|
+
local_var_path = "/subscriptions/{subId}".sub('{format}','json').sub('{' + 'subId' + '}', sub_id.to_s)
|
|
96
|
+
|
|
97
|
+
# query parameters
|
|
98
|
+
query_params = {}
|
|
99
|
+
|
|
100
|
+
# header parameters
|
|
101
|
+
header_params = {}
|
|
102
|
+
# HTTP header 'Accept' (if needed)
|
|
103
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
104
|
+
|
|
105
|
+
# form parameters
|
|
106
|
+
form_params = {}
|
|
107
|
+
|
|
108
|
+
# http body (model)
|
|
109
|
+
post_body = nil
|
|
110
|
+
auth_names = ['artikcloud_oauth']
|
|
111
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
112
|
+
:header_params => header_params,
|
|
113
|
+
:query_params => query_params,
|
|
114
|
+
:form_params => form_params,
|
|
115
|
+
:body => post_body,
|
|
116
|
+
:auth_names => auth_names,
|
|
117
|
+
:return_type => 'SubscriptionEnvelope')
|
|
118
|
+
if @api_client.config.debugging
|
|
119
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#delete_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
120
|
+
end
|
|
121
|
+
return data, status_code, headers
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Get All Subscriptions
|
|
125
|
+
# Get All Subscriptions
|
|
126
|
+
# @param [Hash] opts the optional parameters
|
|
127
|
+
# @option opts [String] :uid User ID
|
|
128
|
+
# @option opts [Integer] :offset Offset for pagination.
|
|
129
|
+
# @option opts [Integer] :count Desired count of items in the result set.
|
|
130
|
+
# @return [SubscriptionsEnvelope]
|
|
131
|
+
def get_all_subscriptions(opts = {})
|
|
132
|
+
data, _status_code, _headers = get_all_subscriptions_with_http_info(opts)
|
|
133
|
+
return data
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Get All Subscriptions
|
|
137
|
+
# Get All Subscriptions
|
|
138
|
+
# @param [Hash] opts the optional parameters
|
|
139
|
+
# @option opts [String] :uid User ID
|
|
140
|
+
# @option opts [Integer] :offset Offset for pagination.
|
|
141
|
+
# @option opts [Integer] :count Desired count of items in the result set.
|
|
142
|
+
# @return [Array<(SubscriptionsEnvelope, Fixnum, Hash)>] SubscriptionsEnvelope data, response status code and response headers
|
|
143
|
+
def get_all_subscriptions_with_http_info(opts = {})
|
|
144
|
+
if @api_client.config.debugging
|
|
145
|
+
@api_client.config.logger.debug "Calling API: SubscriptionsApi.get_all_subscriptions ..."
|
|
146
|
+
end
|
|
147
|
+
# resource path
|
|
148
|
+
local_var_path = "/subscriptions".sub('{format}','json')
|
|
149
|
+
|
|
150
|
+
# query parameters
|
|
151
|
+
query_params = {}
|
|
152
|
+
query_params[:'uid'] = opts[:'uid'] if !opts[:'uid'].nil?
|
|
153
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
154
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
|
155
|
+
|
|
156
|
+
# header parameters
|
|
157
|
+
header_params = {}
|
|
158
|
+
# HTTP header 'Accept' (if needed)
|
|
159
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
160
|
+
|
|
161
|
+
# form parameters
|
|
162
|
+
form_params = {}
|
|
163
|
+
|
|
164
|
+
# http body (model)
|
|
165
|
+
post_body = nil
|
|
166
|
+
auth_names = ['artikcloud_oauth']
|
|
167
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
168
|
+
:header_params => header_params,
|
|
169
|
+
:query_params => query_params,
|
|
170
|
+
:form_params => form_params,
|
|
171
|
+
:body => post_body,
|
|
172
|
+
:auth_names => auth_names,
|
|
173
|
+
:return_type => 'SubscriptionsEnvelope')
|
|
174
|
+
if @api_client.config.debugging
|
|
175
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#get_all_subscriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
176
|
+
end
|
|
177
|
+
return data, status_code, headers
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Get Messages
|
|
181
|
+
# Get Messages
|
|
182
|
+
# @param notif_id Notification ID.
|
|
183
|
+
# @param [Hash] opts the optional parameters
|
|
184
|
+
# @option opts [Integer] :offset Offset for pagination.
|
|
185
|
+
# @option opts [Integer] :count Desired count of items in the result set.
|
|
186
|
+
# @option opts [String] :order Sort order of results by ts. Either 'asc' or 'desc'.
|
|
187
|
+
# @return [NotifMessagesResponse]
|
|
188
|
+
def get_messages(notif_id, opts = {})
|
|
189
|
+
data, _status_code, _headers = get_messages_with_http_info(notif_id, opts)
|
|
190
|
+
return data
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Get Messages
|
|
194
|
+
# Get Messages
|
|
195
|
+
# @param notif_id Notification ID.
|
|
196
|
+
# @param [Hash] opts the optional parameters
|
|
197
|
+
# @option opts [Integer] :offset Offset for pagination.
|
|
198
|
+
# @option opts [Integer] :count Desired count of items in the result set.
|
|
199
|
+
# @option opts [String] :order Sort order of results by ts. Either 'asc' or 'desc'.
|
|
200
|
+
# @return [Array<(NotifMessagesResponse, Fixnum, Hash)>] NotifMessagesResponse data, response status code and response headers
|
|
201
|
+
def get_messages_with_http_info(notif_id, opts = {})
|
|
202
|
+
if @api_client.config.debugging
|
|
203
|
+
@api_client.config.logger.debug "Calling API: SubscriptionsApi.get_messages ..."
|
|
204
|
+
end
|
|
205
|
+
# verify the required parameter 'notif_id' is set
|
|
206
|
+
fail ArgumentError, "Missing the required parameter 'notif_id' when calling SubscriptionsApi.get_messages" if notif_id.nil?
|
|
207
|
+
# resource path
|
|
208
|
+
local_var_path = "/notifications/{notifId}/messages".sub('{format}','json').sub('{' + 'notifId' + '}', notif_id.to_s)
|
|
209
|
+
|
|
210
|
+
# query parameters
|
|
211
|
+
query_params = {}
|
|
212
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
|
213
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
|
214
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
215
|
+
|
|
216
|
+
# header parameters
|
|
217
|
+
header_params = {}
|
|
218
|
+
# HTTP header 'Accept' (if needed)
|
|
219
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
220
|
+
|
|
221
|
+
# form parameters
|
|
222
|
+
form_params = {}
|
|
223
|
+
|
|
224
|
+
# http body (model)
|
|
225
|
+
post_body = nil
|
|
226
|
+
auth_names = ['artikcloud_oauth']
|
|
227
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
228
|
+
:header_params => header_params,
|
|
229
|
+
:query_params => query_params,
|
|
230
|
+
:form_params => form_params,
|
|
231
|
+
:body => post_body,
|
|
232
|
+
:auth_names => auth_names,
|
|
233
|
+
:return_type => 'NotifMessagesResponse')
|
|
234
|
+
if @api_client.config.debugging
|
|
235
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#get_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
236
|
+
end
|
|
237
|
+
return data, status_code, headers
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Get Subscription
|
|
241
|
+
# Get Subscription
|
|
242
|
+
# @param sub_id Subscription ID.
|
|
243
|
+
# @param [Hash] opts the optional parameters
|
|
244
|
+
# @return [SubscriptionEnvelope]
|
|
245
|
+
def get_subscription(sub_id, opts = {})
|
|
246
|
+
data, _status_code, _headers = get_subscription_with_http_info(sub_id, opts)
|
|
247
|
+
return data
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Get Subscription
|
|
251
|
+
# Get Subscription
|
|
252
|
+
# @param sub_id Subscription ID.
|
|
253
|
+
# @param [Hash] opts the optional parameters
|
|
254
|
+
# @return [Array<(SubscriptionEnvelope, Fixnum, Hash)>] SubscriptionEnvelope data, response status code and response headers
|
|
255
|
+
def get_subscription_with_http_info(sub_id, opts = {})
|
|
256
|
+
if @api_client.config.debugging
|
|
257
|
+
@api_client.config.logger.debug "Calling API: SubscriptionsApi.get_subscription ..."
|
|
258
|
+
end
|
|
259
|
+
# verify the required parameter 'sub_id' is set
|
|
260
|
+
fail ArgumentError, "Missing the required parameter 'sub_id' when calling SubscriptionsApi.get_subscription" if sub_id.nil?
|
|
261
|
+
# resource path
|
|
262
|
+
local_var_path = "/subscriptions/{subId}".sub('{format}','json').sub('{' + 'subId' + '}', sub_id.to_s)
|
|
263
|
+
|
|
264
|
+
# query parameters
|
|
265
|
+
query_params = {}
|
|
266
|
+
|
|
267
|
+
# header parameters
|
|
268
|
+
header_params = {}
|
|
269
|
+
# HTTP header 'Accept' (if needed)
|
|
270
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
271
|
+
|
|
272
|
+
# form parameters
|
|
273
|
+
form_params = {}
|
|
274
|
+
|
|
275
|
+
# http body (model)
|
|
276
|
+
post_body = nil
|
|
277
|
+
auth_names = ['artikcloud_oauth']
|
|
278
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
279
|
+
:header_params => header_params,
|
|
280
|
+
:query_params => query_params,
|
|
281
|
+
:form_params => form_params,
|
|
282
|
+
:body => post_body,
|
|
283
|
+
:auth_names => auth_names,
|
|
284
|
+
:return_type => 'SubscriptionEnvelope')
|
|
285
|
+
if @api_client.config.debugging
|
|
286
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#get_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
287
|
+
end
|
|
288
|
+
return data, status_code, headers
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# Validate Subscription
|
|
292
|
+
# Validate Subscription
|
|
293
|
+
# @param sub_id Subscription ID.
|
|
294
|
+
# @param validation_callback_request Subscription validation callback request
|
|
295
|
+
# @param [Hash] opts the optional parameters
|
|
296
|
+
# @return [SubscriptionEnvelope]
|
|
297
|
+
def validate_subscription(sub_id, validation_callback_request, opts = {})
|
|
298
|
+
data, _status_code, _headers = validate_subscription_with_http_info(sub_id, validation_callback_request, opts)
|
|
299
|
+
return data
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# Validate Subscription
|
|
303
|
+
# Validate Subscription
|
|
304
|
+
# @param sub_id Subscription ID.
|
|
305
|
+
# @param validation_callback_request Subscription validation callback request
|
|
306
|
+
# @param [Hash] opts the optional parameters
|
|
307
|
+
# @return [Array<(SubscriptionEnvelope, Fixnum, Hash)>] SubscriptionEnvelope data, response status code and response headers
|
|
308
|
+
def validate_subscription_with_http_info(sub_id, validation_callback_request, opts = {})
|
|
309
|
+
if @api_client.config.debugging
|
|
310
|
+
@api_client.config.logger.debug "Calling API: SubscriptionsApi.validate_subscription ..."
|
|
311
|
+
end
|
|
312
|
+
# verify the required parameter 'sub_id' is set
|
|
313
|
+
fail ArgumentError, "Missing the required parameter 'sub_id' when calling SubscriptionsApi.validate_subscription" if sub_id.nil?
|
|
314
|
+
# verify the required parameter 'validation_callback_request' is set
|
|
315
|
+
fail ArgumentError, "Missing the required parameter 'validation_callback_request' when calling SubscriptionsApi.validate_subscription" if validation_callback_request.nil?
|
|
316
|
+
# resource path
|
|
317
|
+
local_var_path = "/subscriptions/{subId}/validate".sub('{format}','json').sub('{' + 'subId' + '}', sub_id.to_s)
|
|
318
|
+
|
|
319
|
+
# query parameters
|
|
320
|
+
query_params = {}
|
|
321
|
+
|
|
322
|
+
# header parameters
|
|
323
|
+
header_params = {}
|
|
324
|
+
# HTTP header 'Accept' (if needed)
|
|
325
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
326
|
+
|
|
327
|
+
# form parameters
|
|
328
|
+
form_params = {}
|
|
329
|
+
|
|
330
|
+
# http body (model)
|
|
331
|
+
post_body = @api_client.object_to_http_body(validation_callback_request)
|
|
332
|
+
auth_names = ['artikcloud_oauth']
|
|
333
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
334
|
+
:header_params => header_params,
|
|
335
|
+
:query_params => query_params,
|
|
336
|
+
:form_params => form_params,
|
|
337
|
+
:body => post_body,
|
|
338
|
+
:auth_names => auth_names,
|
|
339
|
+
:return_type => 'SubscriptionEnvelope')
|
|
340
|
+
if @api_client.config.debugging
|
|
341
|
+
@api_client.config.logger.debug "API called: SubscriptionsApi#validate_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
342
|
+
end
|
|
343
|
+
return data, status_code, headers
|
|
344
|
+
end
|
|
345
|
+
end
|
|
346
|
+
end
|
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#ARTIK Cloud API
|
|
3
3
|
|
|
4
|
-
#No
|
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
5
5
|
|
|
6
6
|
OpenAPI spec version: 2.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
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
|
|
15
|
-
|
|
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.
|
|
21
|
-
|
|
22
10
|
=end
|
|
23
11
|
|
|
24
12
|
require "uri"
|
|
@@ -56,14 +44,8 @@ module ArtikCloud
|
|
|
56
44
|
|
|
57
45
|
# header parameters
|
|
58
46
|
header_params = {}
|
|
59
|
-
|
|
60
47
|
# HTTP header 'Accept' (if needed)
|
|
61
|
-
|
|
62
|
-
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
|
63
|
-
|
|
64
|
-
# HTTP header 'Content-Type'
|
|
65
|
-
local_header_content_type = []
|
|
66
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
67
49
|
|
|
68
50
|
# form parameters
|
|
69
51
|
form_params = {}
|
|
@@ -124,14 +106,8 @@ module ArtikCloud
|
|
|
124
106
|
|
|
125
107
|
# header parameters
|
|
126
108
|
header_params = {}
|
|
127
|
-
|
|
128
109
|
# HTTP header 'Accept' (if needed)
|
|
129
|
-
|
|
130
|
-
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
|
131
|
-
|
|
132
|
-
# HTTP header 'Content-Type'
|
|
133
|
-
local_header_content_type = []
|
|
134
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
|
110
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
135
111
|
|
|
136
112
|
# form parameters
|
|
137
113
|
form_params = {}
|
|
@@ -180,14 +156,8 @@ module ArtikCloud
|
|
|
180
156
|
|
|
181
157
|
# header parameters
|
|
182
158
|
header_params = {}
|
|
183
|
-
|
|
184
159
|
# HTTP header 'Accept' (if needed)
|
|
185
|
-
|
|
186
|
-
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
|
|
187
|
-
|
|
188
|
-
# HTTP header 'Content-Type'
|
|
189
|
-
local_header_content_type = []
|
|
190
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
|
|
160
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
191
161
|
|
|
192
162
|
# form parameters
|
|
193
163
|
form_params = {}
|