artikcloud 2.0.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 +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,552 @@
|
|
|
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 UsersApi
|
|
19
|
+
attr_accessor :api_client
|
|
20
|
+
|
|
21
|
+
def initialize(api_client = ApiClient.default)
|
|
22
|
+
@api_client = api_client
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Create User Application Properties
|
|
26
|
+
# Create application properties for a user
|
|
27
|
+
# @param user_id User Id
|
|
28
|
+
# @param properties Properties to be updated
|
|
29
|
+
# @param [Hash] opts the optional parameters
|
|
30
|
+
# @option opts [String] :aid Application ID
|
|
31
|
+
# @return [PropertiesEnvelope]
|
|
32
|
+
def create_user_properties(user_id, properties, opts = {})
|
|
33
|
+
data, status_code, headers = create_user_properties_with_http_info(user_id, properties, opts)
|
|
34
|
+
return data
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Create User Application Properties
|
|
38
|
+
# Create application properties for a user
|
|
39
|
+
# @param user_id User Id
|
|
40
|
+
# @param properties Properties to be updated
|
|
41
|
+
# @param [Hash] opts the optional parameters
|
|
42
|
+
# @option opts [String] :aid Application ID
|
|
43
|
+
# @return [Array<(PropertiesEnvelope, Fixnum, Hash)>] PropertiesEnvelope data, response status code and response headers
|
|
44
|
+
def create_user_properties_with_http_info(user_id, properties, opts = {})
|
|
45
|
+
if @api_client.config.debugging
|
|
46
|
+
@api_client.config.logger.debug "Calling API: UsersApi#create_user_properties ..."
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# verify the required parameter 'user_id' is set
|
|
50
|
+
fail "Missing the required parameter 'user_id' when calling create_user_properties" if user_id.nil?
|
|
51
|
+
|
|
52
|
+
# verify the required parameter 'properties' is set
|
|
53
|
+
fail "Missing the required parameter 'properties' when calling create_user_properties" if properties.nil?
|
|
54
|
+
|
|
55
|
+
# resource path
|
|
56
|
+
local_var_path = "/users/{userId}/properties".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)
|
|
57
|
+
|
|
58
|
+
# query parameters
|
|
59
|
+
query_params = {}
|
|
60
|
+
query_params[:'aid'] = opts[:'aid'] if opts[:'aid']
|
|
61
|
+
|
|
62
|
+
# header parameters
|
|
63
|
+
header_params = {}
|
|
64
|
+
|
|
65
|
+
# HTTP header 'Accept' (if needed)
|
|
66
|
+
_header_accept = ['application/json']
|
|
67
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
|
68
|
+
|
|
69
|
+
# HTTP header 'Content-Type'
|
|
70
|
+
_header_content_type = ['application/json']
|
|
71
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
|
72
|
+
|
|
73
|
+
# form parameters
|
|
74
|
+
form_params = {}
|
|
75
|
+
|
|
76
|
+
# http body (model)
|
|
77
|
+
post_body = @api_client.object_to_http_body(properties)
|
|
78
|
+
|
|
79
|
+
auth_names = ['artikcloud_oauth']
|
|
80
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
81
|
+
:header_params => header_params,
|
|
82
|
+
:query_params => query_params,
|
|
83
|
+
:form_params => form_params,
|
|
84
|
+
:body => post_body,
|
|
85
|
+
:auth_names => auth_names,
|
|
86
|
+
:return_type => 'PropertiesEnvelope')
|
|
87
|
+
if @api_client.config.debugging
|
|
88
|
+
@api_client.config.logger.debug "API called: UsersApi#create_user_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
89
|
+
end
|
|
90
|
+
return data, status_code, headers
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Delete User Application Properties
|
|
94
|
+
# Deletes a user's application properties
|
|
95
|
+
# @param user_id User Id
|
|
96
|
+
# @param [Hash] opts the optional parameters
|
|
97
|
+
# @option opts [String] :aid Application ID
|
|
98
|
+
# @return [PropertiesEnvelope]
|
|
99
|
+
def delete_user_properties(user_id, opts = {})
|
|
100
|
+
data, status_code, headers = delete_user_properties_with_http_info(user_id, opts)
|
|
101
|
+
return data
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Delete User Application Properties
|
|
105
|
+
# Deletes a user's application properties
|
|
106
|
+
# @param user_id User Id
|
|
107
|
+
# @param [Hash] opts the optional parameters
|
|
108
|
+
# @option opts [String] :aid Application ID
|
|
109
|
+
# @return [Array<(PropertiesEnvelope, Fixnum, Hash)>] PropertiesEnvelope data, response status code and response headers
|
|
110
|
+
def delete_user_properties_with_http_info(user_id, opts = {})
|
|
111
|
+
if @api_client.config.debugging
|
|
112
|
+
@api_client.config.logger.debug "Calling API: UsersApi#delete_user_properties ..."
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# verify the required parameter 'user_id' is set
|
|
116
|
+
fail "Missing the required parameter 'user_id' when calling delete_user_properties" if user_id.nil?
|
|
117
|
+
|
|
118
|
+
# resource path
|
|
119
|
+
local_var_path = "/users/{userId}/properties".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)
|
|
120
|
+
|
|
121
|
+
# query parameters
|
|
122
|
+
query_params = {}
|
|
123
|
+
query_params[:'aid'] = opts[:'aid'] if opts[:'aid']
|
|
124
|
+
|
|
125
|
+
# header parameters
|
|
126
|
+
header_params = {}
|
|
127
|
+
|
|
128
|
+
# HTTP header 'Accept' (if needed)
|
|
129
|
+
_header_accept = ['application/json']
|
|
130
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
|
131
|
+
|
|
132
|
+
# HTTP header 'Content-Type'
|
|
133
|
+
_header_content_type = []
|
|
134
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
|
135
|
+
|
|
136
|
+
# form parameters
|
|
137
|
+
form_params = {}
|
|
138
|
+
|
|
139
|
+
# http body (model)
|
|
140
|
+
post_body = nil
|
|
141
|
+
|
|
142
|
+
auth_names = ['artikcloud_oauth']
|
|
143
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
144
|
+
:header_params => header_params,
|
|
145
|
+
:query_params => query_params,
|
|
146
|
+
:form_params => form_params,
|
|
147
|
+
:body => post_body,
|
|
148
|
+
:auth_names => auth_names,
|
|
149
|
+
:return_type => 'PropertiesEnvelope')
|
|
150
|
+
if @api_client.config.debugging
|
|
151
|
+
@api_client.config.logger.debug "API called: UsersApi#delete_user_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
152
|
+
end
|
|
153
|
+
return data, status_code, headers
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Get Current User Profile
|
|
157
|
+
# Get's the current user's profile
|
|
158
|
+
# @param [Hash] opts the optional parameters
|
|
159
|
+
# @return [UserEnvelope]
|
|
160
|
+
def get_self(opts = {})
|
|
161
|
+
data, status_code, headers = get_self_with_http_info(opts)
|
|
162
|
+
return data
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Get Current User Profile
|
|
166
|
+
# Get's the current user's profile
|
|
167
|
+
# @param [Hash] opts the optional parameters
|
|
168
|
+
# @return [Array<(UserEnvelope, Fixnum, Hash)>] UserEnvelope data, response status code and response headers
|
|
169
|
+
def get_self_with_http_info(opts = {})
|
|
170
|
+
if @api_client.config.debugging
|
|
171
|
+
@api_client.config.logger.debug "Calling API: UsersApi#get_self ..."
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# resource path
|
|
175
|
+
local_var_path = "/users/self".sub('{format}','json')
|
|
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 => 'UserEnvelope')
|
|
205
|
+
if @api_client.config.debugging
|
|
206
|
+
@api_client.config.logger.debug "API called: UsersApi#get_self\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
207
|
+
end
|
|
208
|
+
return data, status_code, headers
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Get User Device Types
|
|
212
|
+
# Retrieve User's Device Types
|
|
213
|
+
# @param user_id User ID.
|
|
214
|
+
# @param [Hash] opts the optional parameters
|
|
215
|
+
# @option opts [Integer] :offset Offset for pagination.
|
|
216
|
+
# @option opts [Integer] :count Desired count of items in the result set
|
|
217
|
+
# @option opts [BOOLEAN] :include_shared Optional. Boolean (true/false) - If false, only return the user's device types. If true, also return device types shared by other users.
|
|
218
|
+
# @return [DeviceTypesEnvelope]
|
|
219
|
+
def get_user_device_types(user_id, opts = {})
|
|
220
|
+
data, status_code, headers = get_user_device_types_with_http_info(user_id, opts)
|
|
221
|
+
return data
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Get User Device Types
|
|
225
|
+
# Retrieve User's Device Types
|
|
226
|
+
# @param user_id User ID.
|
|
227
|
+
# @param [Hash] opts the optional parameters
|
|
228
|
+
# @option opts [Integer] :offset Offset for pagination.
|
|
229
|
+
# @option opts [Integer] :count Desired count of items in the result set
|
|
230
|
+
# @option opts [BOOLEAN] :include_shared Optional. Boolean (true/false) - If false, only return the user's device types. If true, also return device types shared by other users.
|
|
231
|
+
# @return [Array<(DeviceTypesEnvelope, Fixnum, Hash)>] DeviceTypesEnvelope data, response status code and response headers
|
|
232
|
+
def get_user_device_types_with_http_info(user_id, opts = {})
|
|
233
|
+
if @api_client.config.debugging
|
|
234
|
+
@api_client.config.logger.debug "Calling API: UsersApi#get_user_device_types ..."
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# verify the required parameter 'user_id' is set
|
|
238
|
+
fail "Missing the required parameter 'user_id' when calling get_user_device_types" if user_id.nil?
|
|
239
|
+
|
|
240
|
+
# resource path
|
|
241
|
+
local_var_path = "/users/{userId}/devicetypes".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)
|
|
242
|
+
|
|
243
|
+
# query parameters
|
|
244
|
+
query_params = {}
|
|
245
|
+
query_params[:'offset'] = opts[:'offset'] if opts[:'offset']
|
|
246
|
+
query_params[:'count'] = opts[:'count'] if opts[:'count']
|
|
247
|
+
query_params[:'includeShared'] = opts[:'include_shared'] if opts[:'include_shared']
|
|
248
|
+
|
|
249
|
+
# header parameters
|
|
250
|
+
header_params = {}
|
|
251
|
+
|
|
252
|
+
# HTTP header 'Accept' (if needed)
|
|
253
|
+
_header_accept = ['application/json']
|
|
254
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
|
255
|
+
|
|
256
|
+
# HTTP header 'Content-Type'
|
|
257
|
+
_header_content_type = []
|
|
258
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
|
259
|
+
|
|
260
|
+
# form parameters
|
|
261
|
+
form_params = {}
|
|
262
|
+
|
|
263
|
+
# http body (model)
|
|
264
|
+
post_body = nil
|
|
265
|
+
|
|
266
|
+
auth_names = ['artikcloud_oauth']
|
|
267
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
268
|
+
:header_params => header_params,
|
|
269
|
+
:query_params => query_params,
|
|
270
|
+
:form_params => form_params,
|
|
271
|
+
:body => post_body,
|
|
272
|
+
:auth_names => auth_names,
|
|
273
|
+
:return_type => 'DeviceTypesEnvelope')
|
|
274
|
+
if @api_client.config.debugging
|
|
275
|
+
@api_client.config.logger.debug "API called: UsersApi#get_user_device_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
276
|
+
end
|
|
277
|
+
return data, status_code, headers
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Get User Devices
|
|
281
|
+
# Retrieve User's Devices
|
|
282
|
+
# @param user_id User ID
|
|
283
|
+
# @param [Hash] opts the optional parameters
|
|
284
|
+
# @option opts [Integer] :offset Offset for pagination.
|
|
285
|
+
# @option opts [Integer] :count Desired count of items in the result set
|
|
286
|
+
# @option opts [BOOLEAN] :include_properties Optional. Boolean (true/false) - If false, only return the user's device types. If true, also return device types shared by other users.
|
|
287
|
+
# @return [DevicesEnvelope]
|
|
288
|
+
def get_user_devices(user_id, opts = {})
|
|
289
|
+
data, status_code, headers = get_user_devices_with_http_info(user_id, opts)
|
|
290
|
+
return data
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Get User Devices
|
|
294
|
+
# Retrieve User's Devices
|
|
295
|
+
# @param user_id User ID
|
|
296
|
+
# @param [Hash] opts the optional parameters
|
|
297
|
+
# @option opts [Integer] :offset Offset for pagination.
|
|
298
|
+
# @option opts [Integer] :count Desired count of items in the result set
|
|
299
|
+
# @option opts [BOOLEAN] :include_properties Optional. Boolean (true/false) - If false, only return the user's device types. If true, also return device types shared by other users.
|
|
300
|
+
# @return [Array<(DevicesEnvelope, Fixnum, Hash)>] DevicesEnvelope data, response status code and response headers
|
|
301
|
+
def get_user_devices_with_http_info(user_id, opts = {})
|
|
302
|
+
if @api_client.config.debugging
|
|
303
|
+
@api_client.config.logger.debug "Calling API: UsersApi#get_user_devices ..."
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# verify the required parameter 'user_id' is set
|
|
307
|
+
fail "Missing the required parameter 'user_id' when calling get_user_devices" if user_id.nil?
|
|
308
|
+
|
|
309
|
+
# resource path
|
|
310
|
+
local_var_path = "/users/{userId}/devices".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)
|
|
311
|
+
|
|
312
|
+
# query parameters
|
|
313
|
+
query_params = {}
|
|
314
|
+
query_params[:'offset'] = opts[:'offset'] if opts[:'offset']
|
|
315
|
+
query_params[:'count'] = opts[:'count'] if opts[:'count']
|
|
316
|
+
query_params[:'includeProperties'] = opts[:'include_properties'] if opts[:'include_properties']
|
|
317
|
+
|
|
318
|
+
# header parameters
|
|
319
|
+
header_params = {}
|
|
320
|
+
|
|
321
|
+
# HTTP header 'Accept' (if needed)
|
|
322
|
+
_header_accept = ['application/json']
|
|
323
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
|
324
|
+
|
|
325
|
+
# HTTP header 'Content-Type'
|
|
326
|
+
_header_content_type = []
|
|
327
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
|
328
|
+
|
|
329
|
+
# form parameters
|
|
330
|
+
form_params = {}
|
|
331
|
+
|
|
332
|
+
# http body (model)
|
|
333
|
+
post_body = nil
|
|
334
|
+
|
|
335
|
+
auth_names = ['artikcloud_oauth']
|
|
336
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
337
|
+
:header_params => header_params,
|
|
338
|
+
:query_params => query_params,
|
|
339
|
+
:form_params => form_params,
|
|
340
|
+
:body => post_body,
|
|
341
|
+
:auth_names => auth_names,
|
|
342
|
+
:return_type => 'DevicesEnvelope')
|
|
343
|
+
if @api_client.config.debugging
|
|
344
|
+
@api_client.config.logger.debug "API called: UsersApi#get_user_devices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
345
|
+
end
|
|
346
|
+
return data, status_code, headers
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
# Get User application properties
|
|
350
|
+
# Get application properties of a user
|
|
351
|
+
# @param user_id User Id
|
|
352
|
+
# @param [Hash] opts the optional parameters
|
|
353
|
+
# @option opts [String] :aid Application ID
|
|
354
|
+
# @return [PropertiesEnvelope]
|
|
355
|
+
def get_user_properties(user_id, opts = {})
|
|
356
|
+
data, status_code, headers = get_user_properties_with_http_info(user_id, opts)
|
|
357
|
+
return data
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
# Get User application properties
|
|
361
|
+
# Get application properties of a user
|
|
362
|
+
# @param user_id User Id
|
|
363
|
+
# @param [Hash] opts the optional parameters
|
|
364
|
+
# @option opts [String] :aid Application ID
|
|
365
|
+
# @return [Array<(PropertiesEnvelope, Fixnum, Hash)>] PropertiesEnvelope data, response status code and response headers
|
|
366
|
+
def get_user_properties_with_http_info(user_id, opts = {})
|
|
367
|
+
if @api_client.config.debugging
|
|
368
|
+
@api_client.config.logger.debug "Calling API: UsersApi#get_user_properties ..."
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
# verify the required parameter 'user_id' is set
|
|
372
|
+
fail "Missing the required parameter 'user_id' when calling get_user_properties" if user_id.nil?
|
|
373
|
+
|
|
374
|
+
# resource path
|
|
375
|
+
local_var_path = "/users/{userId}/properties".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)
|
|
376
|
+
|
|
377
|
+
# query parameters
|
|
378
|
+
query_params = {}
|
|
379
|
+
query_params[:'aid'] = opts[:'aid'] if opts[:'aid']
|
|
380
|
+
|
|
381
|
+
# header parameters
|
|
382
|
+
header_params = {}
|
|
383
|
+
|
|
384
|
+
# HTTP header 'Accept' (if needed)
|
|
385
|
+
_header_accept = ['application/json']
|
|
386
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
|
387
|
+
|
|
388
|
+
# HTTP header 'Content-Type'
|
|
389
|
+
_header_content_type = []
|
|
390
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
|
391
|
+
|
|
392
|
+
# form parameters
|
|
393
|
+
form_params = {}
|
|
394
|
+
|
|
395
|
+
# http body (model)
|
|
396
|
+
post_body = nil
|
|
397
|
+
|
|
398
|
+
auth_names = ['artikcloud_oauth']
|
|
399
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
400
|
+
:header_params => header_params,
|
|
401
|
+
:query_params => query_params,
|
|
402
|
+
:form_params => form_params,
|
|
403
|
+
:body => post_body,
|
|
404
|
+
:auth_names => auth_names,
|
|
405
|
+
:return_type => 'PropertiesEnvelope')
|
|
406
|
+
if @api_client.config.debugging
|
|
407
|
+
@api_client.config.logger.debug "API called: UsersApi#get_user_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
408
|
+
end
|
|
409
|
+
return data, status_code, headers
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
# Get User Rules
|
|
413
|
+
# Retrieve User's Rules
|
|
414
|
+
# @param user_id User ID.
|
|
415
|
+
# @param [Hash] opts the optional parameters
|
|
416
|
+
# @option opts [BOOLEAN] :exclude_disabled Exclude disabled rules in the result.
|
|
417
|
+
# @option opts [BOOLEAN] :other_applications List rules of other applications if current application id has full read access
|
|
418
|
+
# @option opts [Integer] :count Desired count of items in the result set.
|
|
419
|
+
# @option opts [Integer] :offset Offset for pagination.
|
|
420
|
+
# @return [RulesEnvelope]
|
|
421
|
+
def get_user_rules(user_id, opts = {})
|
|
422
|
+
data, status_code, headers = get_user_rules_with_http_info(user_id, opts)
|
|
423
|
+
return data
|
|
424
|
+
end
|
|
425
|
+
|
|
426
|
+
# Get User Rules
|
|
427
|
+
# Retrieve User's Rules
|
|
428
|
+
# @param user_id User ID.
|
|
429
|
+
# @param [Hash] opts the optional parameters
|
|
430
|
+
# @option opts [BOOLEAN] :exclude_disabled Exclude disabled rules in the result.
|
|
431
|
+
# @option opts [BOOLEAN] :other_applications List rules of other applications if current application id has full read access
|
|
432
|
+
# @option opts [Integer] :count Desired count of items in the result set.
|
|
433
|
+
# @option opts [Integer] :offset Offset for pagination.
|
|
434
|
+
# @return [Array<(RulesEnvelope, Fixnum, Hash)>] RulesEnvelope data, response status code and response headers
|
|
435
|
+
def get_user_rules_with_http_info(user_id, opts = {})
|
|
436
|
+
if @api_client.config.debugging
|
|
437
|
+
@api_client.config.logger.debug "Calling API: UsersApi#get_user_rules ..."
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
# verify the required parameter 'user_id' is set
|
|
441
|
+
fail "Missing the required parameter 'user_id' when calling get_user_rules" if user_id.nil?
|
|
442
|
+
|
|
443
|
+
# resource path
|
|
444
|
+
local_var_path = "/users/{userId}/rules".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)
|
|
445
|
+
|
|
446
|
+
# query parameters
|
|
447
|
+
query_params = {}
|
|
448
|
+
query_params[:'excludeDisabled'] = opts[:'exclude_disabled'] if opts[:'exclude_disabled']
|
|
449
|
+
query_params[:'otherApplications'] = opts[:'other_applications'] if opts[:'other_applications']
|
|
450
|
+
query_params[:'count'] = opts[:'count'] if opts[:'count']
|
|
451
|
+
query_params[:'offset'] = opts[:'offset'] if opts[:'offset']
|
|
452
|
+
|
|
453
|
+
# header parameters
|
|
454
|
+
header_params = {}
|
|
455
|
+
|
|
456
|
+
# HTTP header 'Accept' (if needed)
|
|
457
|
+
_header_accept = ['application/json']
|
|
458
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
|
459
|
+
|
|
460
|
+
# HTTP header 'Content-Type'
|
|
461
|
+
_header_content_type = []
|
|
462
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
|
463
|
+
|
|
464
|
+
# form parameters
|
|
465
|
+
form_params = {}
|
|
466
|
+
|
|
467
|
+
# http body (model)
|
|
468
|
+
post_body = nil
|
|
469
|
+
|
|
470
|
+
auth_names = ['artikcloud_oauth']
|
|
471
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
472
|
+
:header_params => header_params,
|
|
473
|
+
:query_params => query_params,
|
|
474
|
+
:form_params => form_params,
|
|
475
|
+
:body => post_body,
|
|
476
|
+
:auth_names => auth_names,
|
|
477
|
+
:return_type => 'RulesEnvelope')
|
|
478
|
+
if @api_client.config.debugging
|
|
479
|
+
@api_client.config.logger.debug "API called: UsersApi#get_user_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
480
|
+
end
|
|
481
|
+
return data, status_code, headers
|
|
482
|
+
end
|
|
483
|
+
|
|
484
|
+
# Update User Application Properties
|
|
485
|
+
# Updates application properties of a user
|
|
486
|
+
# @param user_id User Id
|
|
487
|
+
# @param properties Properties to be updated
|
|
488
|
+
# @param [Hash] opts the optional parameters
|
|
489
|
+
# @option opts [String] :aid Application ID
|
|
490
|
+
# @return [PropertiesEnvelope]
|
|
491
|
+
def update_user_properties(user_id, properties, opts = {})
|
|
492
|
+
data, status_code, headers = update_user_properties_with_http_info(user_id, properties, opts)
|
|
493
|
+
return data
|
|
494
|
+
end
|
|
495
|
+
|
|
496
|
+
# Update User Application Properties
|
|
497
|
+
# Updates application properties of a user
|
|
498
|
+
# @param user_id User Id
|
|
499
|
+
# @param properties Properties to be updated
|
|
500
|
+
# @param [Hash] opts the optional parameters
|
|
501
|
+
# @option opts [String] :aid Application ID
|
|
502
|
+
# @return [Array<(PropertiesEnvelope, Fixnum, Hash)>] PropertiesEnvelope data, response status code and response headers
|
|
503
|
+
def update_user_properties_with_http_info(user_id, properties, opts = {})
|
|
504
|
+
if @api_client.config.debugging
|
|
505
|
+
@api_client.config.logger.debug "Calling API: UsersApi#update_user_properties ..."
|
|
506
|
+
end
|
|
507
|
+
|
|
508
|
+
# verify the required parameter 'user_id' is set
|
|
509
|
+
fail "Missing the required parameter 'user_id' when calling update_user_properties" if user_id.nil?
|
|
510
|
+
|
|
511
|
+
# verify the required parameter 'properties' is set
|
|
512
|
+
fail "Missing the required parameter 'properties' when calling update_user_properties" if properties.nil?
|
|
513
|
+
|
|
514
|
+
# resource path
|
|
515
|
+
local_var_path = "/users/{userId}/properties".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)
|
|
516
|
+
|
|
517
|
+
# query parameters
|
|
518
|
+
query_params = {}
|
|
519
|
+
query_params[:'aid'] = opts[:'aid'] if opts[:'aid']
|
|
520
|
+
|
|
521
|
+
# header parameters
|
|
522
|
+
header_params = {}
|
|
523
|
+
|
|
524
|
+
# HTTP header 'Accept' (if needed)
|
|
525
|
+
_header_accept = ['application/json']
|
|
526
|
+
_header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result
|
|
527
|
+
|
|
528
|
+
# HTTP header 'Content-Type'
|
|
529
|
+
_header_content_type = ['application/json']
|
|
530
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)
|
|
531
|
+
|
|
532
|
+
# form parameters
|
|
533
|
+
form_params = {}
|
|
534
|
+
|
|
535
|
+
# http body (model)
|
|
536
|
+
post_body = @api_client.object_to_http_body(properties)
|
|
537
|
+
|
|
538
|
+
auth_names = ['artikcloud_oauth']
|
|
539
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
540
|
+
:header_params => header_params,
|
|
541
|
+
:query_params => query_params,
|
|
542
|
+
:form_params => form_params,
|
|
543
|
+
:body => post_body,
|
|
544
|
+
:auth_names => auth_names,
|
|
545
|
+
:return_type => 'PropertiesEnvelope')
|
|
546
|
+
if @api_client.config.debugging
|
|
547
|
+
@api_client.config.logger.debug "API called: UsersApi#update_user_properties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
548
|
+
end
|
|
549
|
+
return data, status_code, headers
|
|
550
|
+
end
|
|
551
|
+
end
|
|
552
|
+
end
|