notifo-io-easierlife 1.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 +9 -0
- data/README.md +167 -0
- data/Rakefile +10 -0
- data/docs/AddAllowedTopicDto.md +18 -0
- data/docs/AddContributorDto.md +20 -0
- data/docs/AppContributorDto.md +22 -0
- data/docs/AppDetailsDto.md +48 -0
- data/docs/AppDto.md +28 -0
- data/docs/AppsApi.md +646 -0
- data/docs/ConfigsApi.md +127 -0
- data/docs/ConfirmMode.md +15 -0
- data/docs/CreateEmailTemplateDto.md +18 -0
- data/docs/EmailTemplateDto.md +22 -0
- data/docs/EmailVerificationStatus.md +15 -0
- data/docs/ErrorDto.md +26 -0
- data/docs/EventDto.md +40 -0
- data/docs/EventsApi.md +142 -0
- data/docs/IsoDayOfWeek.md +15 -0
- data/docs/ListResponseDtoOfEventDto.md +20 -0
- data/docs/ListResponseDtoOfLogEntryDto.md +20 -0
- data/docs/ListResponseDtoOfMediaDto.md +20 -0
- data/docs/ListResponseDtoOfSubscriptionDto.md +20 -0
- data/docs/ListResponseDtoOfTemplateDto.md +20 -0
- data/docs/ListResponseDtoOfTopicDto.md +20 -0
- data/docs/ListResponseDtoOfUserDto.md +20 -0
- data/docs/LogEntryDto.md +24 -0
- data/docs/LogsApi.md +78 -0
- data/docs/MediaApi.md +382 -0
- data/docs/MediaDto.md +30 -0
- data/docs/MediaType.md +15 -0
- data/docs/NotificationFormattingDto.md +32 -0
- data/docs/NotificationSend.md +15 -0
- data/docs/NotificationSettingDto.md +20 -0
- data/docs/ProfileDto.md +32 -0
- data/docs/PublishDto.md +36 -0
- data/docs/PublishManyDto.md +18 -0
- data/docs/ResizeMode.md +15 -0
- data/docs/SchedulingDto.md +24 -0
- data/docs/SchedulingType.md +15 -0
- data/docs/SubscriptionDto.md +20 -0
- data/docs/TemplateDto.md +22 -0
- data/docs/TemplatesApi.md +208 -0
- data/docs/TopicDto.md +22 -0
- data/docs/TopicsApi.md +78 -0
- data/docs/UpdateProfileDto.md +28 -0
- data/docs/UpsertAppDto.md +36 -0
- data/docs/UpsertTemplateDto.md +22 -0
- data/docs/UpsertTemplatesDto.md +18 -0
- data/docs/UpsertUserDto.md +32 -0
- data/docs/UpsertUsersDto.md +18 -0
- data/docs/UserApi.md +323 -0
- data/docs/UserDto.md +36 -0
- data/docs/UsersApi.md +610 -0
- data/git_push.sh +58 -0
- data/lib/notifo.rb +89 -0
- data/lib/notifo/api/apps_api.rb +678 -0
- data/lib/notifo/api/configs_api.rb +132 -0
- data/lib/notifo/api/events_api.rb +161 -0
- data/lib/notifo/api/logs_api.rb +92 -0
- data/lib/notifo/api/media_api.rb +419 -0
- data/lib/notifo/api/templates_api.rb +228 -0
- data/lib/notifo/api/topics_api.rb +92 -0
- data/lib/notifo/api/user_api.rb +331 -0
- data/lib/notifo/api/users_api.rb +667 -0
- data/lib/notifo/api_client.rb +389 -0
- data/lib/notifo/api_error.rb +57 -0
- data/lib/notifo/configuration.rb +270 -0
- data/lib/notifo/models/add_allowed_topic_dto.rb +243 -0
- data/lib/notifo/models/add_contributor_dto.rb +277 -0
- data/lib/notifo/models/app_contributor_dto.rb +311 -0
- data/lib/notifo/models/app_details_dto.rb +489 -0
- data/lib/notifo/models/app_dto.rb +362 -0
- data/lib/notifo/models/confirm_mode.rb +38 -0
- data/lib/notifo/models/create_email_template_dto.rb +243 -0
- data/lib/notifo/models/email_template_dto.rb +288 -0
- data/lib/notifo/models/email_verification_status.rb +39 -0
- data/lib/notifo/models/error_dto.rb +265 -0
- data/lib/notifo/models/event_dto.rb +456 -0
- data/lib/notifo/models/iso_day_of_week.rb +43 -0
- data/lib/notifo/models/list_response_dto_of_event_dto.rb +241 -0
- data/lib/notifo/models/list_response_dto_of_log_entry_dto.rb +241 -0
- data/lib/notifo/models/list_response_dto_of_media_dto.rb +241 -0
- data/lib/notifo/models/list_response_dto_of_subscription_dto.rb +241 -0
- data/lib/notifo/models/list_response_dto_of_template_dto.rb +241 -0
- data/lib/notifo/models/list_response_dto_of_topic_dto.rb +241 -0
- data/lib/notifo/models/list_response_dto_of_user_dto.rb +241 -0
- data/lib/notifo/models/log_entry_dto.rb +326 -0
- data/lib/notifo/models/media_dto.rb +390 -0
- data/lib/notifo/models/media_type.rb +39 -0
- data/lib/notifo/models/notification_formatting_dto.rb +305 -0
- data/lib/notifo/models/notification_send.rb +39 -0
- data/lib/notifo/models/notification_setting_dto.rb +234 -0
- data/lib/notifo/models/profile_dto.rb +361 -0
- data/lib/notifo/models/publish_dto.rb +338 -0
- data/lib/notifo/models/publish_many_dto.rb +226 -0
- data/lib/notifo/models/resize_mode.rb +42 -0
- data/lib/notifo/models/scheduling_dto.rb +248 -0
- data/lib/notifo/models/scheduling_type.rb +37 -0
- data/lib/notifo/models/subscription_dto.rb +256 -0
- data/lib/notifo/models/template_dto.rb +274 -0
- data/lib/notifo/models/topic_dto.rb +294 -0
- data/lib/notifo/models/update_profile_dto.rb +277 -0
- data/lib/notifo/models/upsert_app_dto.rb +321 -0
- data/lib/notifo/models/upsert_template_dto.rb +270 -0
- data/lib/notifo/models/upsert_templates_dto.rb +226 -0
- data/lib/notifo/models/upsert_user_dto.rb +299 -0
- data/lib/notifo/models/upsert_users_dto.rb +226 -0
- data/lib/notifo/models/user_dto.rb +381 -0
- data/lib/notifo/version.rb +15 -0
- data/notifo-io-1.0.0.gem +0 -0
- data/notifo.gemspec +38 -0
- data/spec/api/apps_api_spec.rb +151 -0
- data/spec/api/configs_api_spec.rb +55 -0
- data/spec/api/events_api_spec.rb +61 -0
- data/spec/api/logs_api_spec.rb +49 -0
- data/spec/api/media_api_spec.rb +117 -0
- data/spec/api/templates_api_spec.rb +73 -0
- data/spec/api/topics_api_spec.rb +49 -0
- data/spec/api/user_api_spec.rb +92 -0
- data/spec/api/users_api_spec.rb +152 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/add_allowed_topic_dto_spec.rb +34 -0
- data/spec/models/add_contributor_dto_spec.rb +40 -0
- data/spec/models/app_contributor_dto_spec.rb +46 -0
- data/spec/models/app_details_dto_spec.rb +124 -0
- data/spec/models/app_dto_spec.rb +64 -0
- data/spec/models/confirm_mode_spec.rb +28 -0
- data/spec/models/create_email_template_dto_spec.rb +34 -0
- data/spec/models/email_template_dto_spec.rb +46 -0
- data/spec/models/email_verification_status_spec.rb +28 -0
- data/spec/models/error_dto_spec.rb +58 -0
- data/spec/models/event_dto_spec.rb +100 -0
- data/spec/models/iso_day_of_week_spec.rb +28 -0
- data/spec/models/list_response_dto_of_event_dto_spec.rb +40 -0
- data/spec/models/list_response_dto_of_log_entry_dto_spec.rb +40 -0
- data/spec/models/list_response_dto_of_media_dto_spec.rb +40 -0
- data/spec/models/list_response_dto_of_subscription_dto_spec.rb +40 -0
- data/spec/models/list_response_dto_of_template_dto_spec.rb +40 -0
- data/spec/models/list_response_dto_of_topic_dto_spec.rb +40 -0
- data/spec/models/list_response_dto_of_user_dto_spec.rb +40 -0
- data/spec/models/log_entry_dto_spec.rb +52 -0
- data/spec/models/media_dto_spec.rb +70 -0
- data/spec/models/media_type_spec.rb +28 -0
- data/spec/models/notification_formatting_dto_spec.rb +76 -0
- data/spec/models/notification_send_spec.rb +28 -0
- data/spec/models/notification_setting_dto_spec.rb +40 -0
- data/spec/models/profile_dto_spec.rb +76 -0
- data/spec/models/publish_dto_spec.rb +88 -0
- data/spec/models/publish_many_dto_spec.rb +34 -0
- data/spec/models/resize_mode_spec.rb +28 -0
- data/spec/models/scheduling_dto_spec.rb +52 -0
- data/spec/models/scheduling_type_spec.rb +28 -0
- data/spec/models/subscription_dto_spec.rb +40 -0
- data/spec/models/template_dto_spec.rb +46 -0
- data/spec/models/topic_dto_spec.rb +46 -0
- data/spec/models/update_profile_dto_spec.rb +64 -0
- data/spec/models/upsert_app_dto_spec.rb +88 -0
- data/spec/models/upsert_template_dto_spec.rb +46 -0
- data/spec/models/upsert_templates_dto_spec.rb +34 -0
- data/spec/models/upsert_user_dto_spec.rb +76 -0
- data/spec/models/upsert_users_dto_spec.rb +34 -0
- data/spec/models/user_dto_spec.rb +88 -0
- data/spec/spec_helper.rb +111 -0
- metadata +301 -0
@@ -0,0 +1,667 @@
|
|
1
|
+
=begin
|
2
|
+
#Notifo API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.1.0-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module Notifo
|
16
|
+
class UsersApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Remove an allowed topic.
|
23
|
+
# @param app_id [String] The app where the users belong to.
|
24
|
+
# @param id [String] The user id.
|
25
|
+
# @param prefix [String] The topic prefix.
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [nil]
|
28
|
+
def users_delete_allowed_topic(app_id, id, prefix, opts = {})
|
29
|
+
users_delete_allowed_topic_with_http_info(app_id, id, prefix, opts)
|
30
|
+
nil
|
31
|
+
end
|
32
|
+
|
33
|
+
# Remove an allowed topic.
|
34
|
+
# @param app_id [String] The app where the users belong to.
|
35
|
+
# @param id [String] The user id.
|
36
|
+
# @param prefix [String] The topic prefix.
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
39
|
+
def users_delete_allowed_topic_with_http_info(app_id, id, prefix, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.users_delete_allowed_topic ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'app_id' is set
|
44
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.users_delete_allowed_topic"
|
46
|
+
end
|
47
|
+
# verify the required parameter 'id' is set
|
48
|
+
if @api_client.config.client_side_validation && id.nil?
|
49
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_delete_allowed_topic"
|
50
|
+
end
|
51
|
+
# verify the required parameter 'prefix' is set
|
52
|
+
if @api_client.config.client_side_validation && prefix.nil?
|
53
|
+
fail ArgumentError, "Missing the required parameter 'prefix' when calling UsersApi.users_delete_allowed_topic"
|
54
|
+
end
|
55
|
+
# resource path
|
56
|
+
local_var_path = '/api/apps/{appId}/users/{id}/allowed-topics/{prefix}'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'prefix' + '}', CGI.escape(prefix.to_s))
|
57
|
+
|
58
|
+
# query parameters
|
59
|
+
query_params = opts[:query_params] || {}
|
60
|
+
|
61
|
+
# header parameters
|
62
|
+
header_params = opts[:header_params] || {}
|
63
|
+
# HTTP header 'Accept' (if needed)
|
64
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
65
|
+
|
66
|
+
# form parameters
|
67
|
+
form_params = opts[:form_params] || {}
|
68
|
+
|
69
|
+
# http body (model)
|
70
|
+
post_body = opts[:debug_body]
|
71
|
+
|
72
|
+
# return_type
|
73
|
+
return_type = opts[:debug_return_type]
|
74
|
+
|
75
|
+
# auth_names
|
76
|
+
auth_names = opts[:debug_auth_names] || []
|
77
|
+
|
78
|
+
new_options = opts.merge(
|
79
|
+
:operation => :"UsersApi.users_delete_allowed_topic",
|
80
|
+
:header_params => header_params,
|
81
|
+
:query_params => query_params,
|
82
|
+
:form_params => form_params,
|
83
|
+
:body => post_body,
|
84
|
+
:auth_names => auth_names,
|
85
|
+
:return_type => return_type
|
86
|
+
)
|
87
|
+
|
88
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
89
|
+
if @api_client.config.debugging
|
90
|
+
@api_client.config.logger.debug "API called: UsersApi#users_delete_allowed_topic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
91
|
+
end
|
92
|
+
return data, status_code, headers
|
93
|
+
end
|
94
|
+
|
95
|
+
# Remove a user subscriptions.
|
96
|
+
# @param app_id [String] The app where the user belongs to.
|
97
|
+
# @param id [String] The user id.
|
98
|
+
# @param prefix [String] The topic prefix.
|
99
|
+
# @param [Hash] opts the optional parameters
|
100
|
+
# @return [nil]
|
101
|
+
def users_delete_subscription(app_id, id, prefix, opts = {})
|
102
|
+
users_delete_subscription_with_http_info(app_id, id, prefix, opts)
|
103
|
+
nil
|
104
|
+
end
|
105
|
+
|
106
|
+
# Remove a user subscriptions.
|
107
|
+
# @param app_id [String] The app where the user belongs to.
|
108
|
+
# @param id [String] The user id.
|
109
|
+
# @param prefix [String] The topic prefix.
|
110
|
+
# @param [Hash] opts the optional parameters
|
111
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
112
|
+
def users_delete_subscription_with_http_info(app_id, id, prefix, opts = {})
|
113
|
+
if @api_client.config.debugging
|
114
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.users_delete_subscription ...'
|
115
|
+
end
|
116
|
+
# verify the required parameter 'app_id' is set
|
117
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
118
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.users_delete_subscription"
|
119
|
+
end
|
120
|
+
# verify the required parameter 'id' is set
|
121
|
+
if @api_client.config.client_side_validation && id.nil?
|
122
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_delete_subscription"
|
123
|
+
end
|
124
|
+
# verify the required parameter 'prefix' is set
|
125
|
+
if @api_client.config.client_side_validation && prefix.nil?
|
126
|
+
fail ArgumentError, "Missing the required parameter 'prefix' when calling UsersApi.users_delete_subscription"
|
127
|
+
end
|
128
|
+
# resource path
|
129
|
+
local_var_path = '/api/apps/{appId}/users/{id}/subscriptions/{prefix}'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'prefix' + '}', CGI.escape(prefix.to_s))
|
130
|
+
|
131
|
+
# query parameters
|
132
|
+
query_params = opts[:query_params] || {}
|
133
|
+
|
134
|
+
# header parameters
|
135
|
+
header_params = opts[:header_params] || {}
|
136
|
+
# HTTP header 'Accept' (if needed)
|
137
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
138
|
+
|
139
|
+
# form parameters
|
140
|
+
form_params = opts[:form_params] || {}
|
141
|
+
|
142
|
+
# http body (model)
|
143
|
+
post_body = opts[:debug_body]
|
144
|
+
|
145
|
+
# return_type
|
146
|
+
return_type = opts[:debug_return_type]
|
147
|
+
|
148
|
+
# auth_names
|
149
|
+
auth_names = opts[:debug_auth_names] || []
|
150
|
+
|
151
|
+
new_options = opts.merge(
|
152
|
+
:operation => :"UsersApi.users_delete_subscription",
|
153
|
+
:header_params => header_params,
|
154
|
+
:query_params => query_params,
|
155
|
+
:form_params => form_params,
|
156
|
+
:body => post_body,
|
157
|
+
:auth_names => auth_names,
|
158
|
+
:return_type => return_type
|
159
|
+
)
|
160
|
+
|
161
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
162
|
+
if @api_client.config.debugging
|
163
|
+
@api_client.config.logger.debug "API called: UsersApi#users_delete_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
164
|
+
end
|
165
|
+
return data, status_code, headers
|
166
|
+
end
|
167
|
+
|
168
|
+
# Delete a user.
|
169
|
+
# @param app_id [String] The app where the users belongs to.
|
170
|
+
# @param id [String] The user id to delete.
|
171
|
+
# @param [Hash] opts the optional parameters
|
172
|
+
# @return [ListResponseDtoOfUserDto]
|
173
|
+
def users_delete_user(app_id, id, opts = {})
|
174
|
+
data, _status_code, _headers = users_delete_user_with_http_info(app_id, id, opts)
|
175
|
+
data
|
176
|
+
end
|
177
|
+
|
178
|
+
# Delete a user.
|
179
|
+
# @param app_id [String] The app where the users belongs to.
|
180
|
+
# @param id [String] The user id to delete.
|
181
|
+
# @param [Hash] opts the optional parameters
|
182
|
+
# @return [Array<(ListResponseDtoOfUserDto, Integer, Hash)>] ListResponseDtoOfUserDto data, response status code and response headers
|
183
|
+
def users_delete_user_with_http_info(app_id, id, opts = {})
|
184
|
+
if @api_client.config.debugging
|
185
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.users_delete_user ...'
|
186
|
+
end
|
187
|
+
# verify the required parameter 'app_id' is set
|
188
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
189
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.users_delete_user"
|
190
|
+
end
|
191
|
+
# verify the required parameter 'id' is set
|
192
|
+
if @api_client.config.client_side_validation && id.nil?
|
193
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_delete_user"
|
194
|
+
end
|
195
|
+
# resource path
|
196
|
+
local_var_path = '/api/apps/{appId}/users/{id}'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
197
|
+
|
198
|
+
# query parameters
|
199
|
+
query_params = opts[:query_params] || {}
|
200
|
+
|
201
|
+
# header parameters
|
202
|
+
header_params = opts[:header_params] || {}
|
203
|
+
# HTTP header 'Accept' (if needed)
|
204
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
205
|
+
|
206
|
+
# form parameters
|
207
|
+
form_params = opts[:form_params] || {}
|
208
|
+
|
209
|
+
# http body (model)
|
210
|
+
post_body = opts[:debug_body]
|
211
|
+
|
212
|
+
# return_type
|
213
|
+
return_type = opts[:debug_return_type] || 'ListResponseDtoOfUserDto'
|
214
|
+
|
215
|
+
# auth_names
|
216
|
+
auth_names = opts[:debug_auth_names] || []
|
217
|
+
|
218
|
+
new_options = opts.merge(
|
219
|
+
:operation => :"UsersApi.users_delete_user",
|
220
|
+
:header_params => header_params,
|
221
|
+
:query_params => query_params,
|
222
|
+
:form_params => form_params,
|
223
|
+
:body => post_body,
|
224
|
+
:auth_names => auth_names,
|
225
|
+
:return_type => return_type
|
226
|
+
)
|
227
|
+
|
228
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
229
|
+
if @api_client.config.debugging
|
230
|
+
@api_client.config.logger.debug "API called: UsersApi#users_delete_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
231
|
+
end
|
232
|
+
return data, status_code, headers
|
233
|
+
end
|
234
|
+
|
235
|
+
# Query user subscriptions.
|
236
|
+
# @param app_id [String] The app where the user belongs to.
|
237
|
+
# @param id [String] The user id.
|
238
|
+
# @param [Hash] opts the optional parameters
|
239
|
+
# @option opts [String] :query The optional query to search for items.
|
240
|
+
# @option opts [Integer] :take The number of items to return.
|
241
|
+
# @option opts [Integer] :skip The number of items to skip.
|
242
|
+
# @return [ListResponseDtoOfSubscriptionDto]
|
243
|
+
def users_get_subscriptions(app_id, id, opts = {})
|
244
|
+
data, _status_code, _headers = users_get_subscriptions_with_http_info(app_id, id, opts)
|
245
|
+
data
|
246
|
+
end
|
247
|
+
|
248
|
+
# Query user subscriptions.
|
249
|
+
# @param app_id [String] The app where the user belongs to.
|
250
|
+
# @param id [String] The user id.
|
251
|
+
# @param [Hash] opts the optional parameters
|
252
|
+
# @option opts [String] :query The optional query to search for items.
|
253
|
+
# @option opts [Integer] :take The number of items to return.
|
254
|
+
# @option opts [Integer] :skip The number of items to skip.
|
255
|
+
# @return [Array<(ListResponseDtoOfSubscriptionDto, Integer, Hash)>] ListResponseDtoOfSubscriptionDto data, response status code and response headers
|
256
|
+
def users_get_subscriptions_with_http_info(app_id, id, opts = {})
|
257
|
+
if @api_client.config.debugging
|
258
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.users_get_subscriptions ...'
|
259
|
+
end
|
260
|
+
# verify the required parameter 'app_id' is set
|
261
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
262
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.users_get_subscriptions"
|
263
|
+
end
|
264
|
+
# verify the required parameter 'id' is set
|
265
|
+
if @api_client.config.client_side_validation && id.nil?
|
266
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_get_subscriptions"
|
267
|
+
end
|
268
|
+
# resource path
|
269
|
+
local_var_path = '/api/apps/{appId}/users/{id}/subscriptions'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
270
|
+
|
271
|
+
# query parameters
|
272
|
+
query_params = opts[:query_params] || {}
|
273
|
+
query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
|
274
|
+
query_params[:'take'] = opts[:'take'] if !opts[:'take'].nil?
|
275
|
+
query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
276
|
+
|
277
|
+
# header parameters
|
278
|
+
header_params = opts[:header_params] || {}
|
279
|
+
# HTTP header 'Accept' (if needed)
|
280
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
281
|
+
|
282
|
+
# form parameters
|
283
|
+
form_params = opts[:form_params] || {}
|
284
|
+
|
285
|
+
# http body (model)
|
286
|
+
post_body = opts[:debug_body]
|
287
|
+
|
288
|
+
# return_type
|
289
|
+
return_type = opts[:debug_return_type] || 'ListResponseDtoOfSubscriptionDto'
|
290
|
+
|
291
|
+
# auth_names
|
292
|
+
auth_names = opts[:debug_auth_names] || []
|
293
|
+
|
294
|
+
new_options = opts.merge(
|
295
|
+
:operation => :"UsersApi.users_get_subscriptions",
|
296
|
+
:header_params => header_params,
|
297
|
+
:query_params => query_params,
|
298
|
+
:form_params => form_params,
|
299
|
+
:body => post_body,
|
300
|
+
:auth_names => auth_names,
|
301
|
+
:return_type => return_type
|
302
|
+
)
|
303
|
+
|
304
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
305
|
+
if @api_client.config.debugging
|
306
|
+
@api_client.config.logger.debug "API called: UsersApi#users_get_subscriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
307
|
+
end
|
308
|
+
return data, status_code, headers
|
309
|
+
end
|
310
|
+
|
311
|
+
# Get a user.
|
312
|
+
# @param app_id [String] The app where the user belongs to.
|
313
|
+
# @param id [String] The user id.
|
314
|
+
# @param [Hash] opts the optional parameters
|
315
|
+
# @return [ListResponseDtoOfUserDto]
|
316
|
+
def users_get_user(app_id, id, opts = {})
|
317
|
+
data, _status_code, _headers = users_get_user_with_http_info(app_id, id, opts)
|
318
|
+
data
|
319
|
+
end
|
320
|
+
|
321
|
+
# Get a user.
|
322
|
+
# @param app_id [String] The app where the user belongs to.
|
323
|
+
# @param id [String] The user id.
|
324
|
+
# @param [Hash] opts the optional parameters
|
325
|
+
# @return [Array<(ListResponseDtoOfUserDto, Integer, Hash)>] ListResponseDtoOfUserDto data, response status code and response headers
|
326
|
+
def users_get_user_with_http_info(app_id, id, opts = {})
|
327
|
+
if @api_client.config.debugging
|
328
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.users_get_user ...'
|
329
|
+
end
|
330
|
+
# verify the required parameter 'app_id' is set
|
331
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
332
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.users_get_user"
|
333
|
+
end
|
334
|
+
# verify the required parameter 'id' is set
|
335
|
+
if @api_client.config.client_side_validation && id.nil?
|
336
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_get_user"
|
337
|
+
end
|
338
|
+
# resource path
|
339
|
+
local_var_path = '/api/apps/{appId}/users/{id}'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
340
|
+
|
341
|
+
# query parameters
|
342
|
+
query_params = opts[:query_params] || {}
|
343
|
+
|
344
|
+
# header parameters
|
345
|
+
header_params = opts[:header_params] || {}
|
346
|
+
# HTTP header 'Accept' (if needed)
|
347
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
348
|
+
|
349
|
+
# form parameters
|
350
|
+
form_params = opts[:form_params] || {}
|
351
|
+
|
352
|
+
# http body (model)
|
353
|
+
post_body = opts[:debug_body]
|
354
|
+
|
355
|
+
# return_type
|
356
|
+
return_type = opts[:debug_return_type] || 'ListResponseDtoOfUserDto'
|
357
|
+
|
358
|
+
# auth_names
|
359
|
+
auth_names = opts[:debug_auth_names] || []
|
360
|
+
|
361
|
+
new_options = opts.merge(
|
362
|
+
:operation => :"UsersApi.users_get_user",
|
363
|
+
:header_params => header_params,
|
364
|
+
:query_params => query_params,
|
365
|
+
:form_params => form_params,
|
366
|
+
:body => post_body,
|
367
|
+
:auth_names => auth_names,
|
368
|
+
:return_type => return_type
|
369
|
+
)
|
370
|
+
|
371
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
372
|
+
if @api_client.config.debugging
|
373
|
+
@api_client.config.logger.debug "API called: UsersApi#users_get_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
374
|
+
end
|
375
|
+
return data, status_code, headers
|
376
|
+
end
|
377
|
+
|
378
|
+
# Query users.
|
379
|
+
# @param app_id [String] The app where the users belongs to.
|
380
|
+
# @param [Hash] opts the optional parameters
|
381
|
+
# @option opts [String] :query The optional query to search for items.
|
382
|
+
# @option opts [Integer] :take The number of items to return.
|
383
|
+
# @option opts [Integer] :skip The number of items to skip.
|
384
|
+
# @return [ListResponseDtoOfUserDto]
|
385
|
+
def users_get_users(app_id, opts = {})
|
386
|
+
data, _status_code, _headers = users_get_users_with_http_info(app_id, opts)
|
387
|
+
data
|
388
|
+
end
|
389
|
+
|
390
|
+
# Query users.
|
391
|
+
# @param app_id [String] The app where the users belongs to.
|
392
|
+
# @param [Hash] opts the optional parameters
|
393
|
+
# @option opts [String] :query The optional query to search for items.
|
394
|
+
# @option opts [Integer] :take The number of items to return.
|
395
|
+
# @option opts [Integer] :skip The number of items to skip.
|
396
|
+
# @return [Array<(ListResponseDtoOfUserDto, Integer, Hash)>] ListResponseDtoOfUserDto data, response status code and response headers
|
397
|
+
def users_get_users_with_http_info(app_id, opts = {})
|
398
|
+
if @api_client.config.debugging
|
399
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.users_get_users ...'
|
400
|
+
end
|
401
|
+
# verify the required parameter 'app_id' is set
|
402
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
403
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.users_get_users"
|
404
|
+
end
|
405
|
+
# resource path
|
406
|
+
local_var_path = '/api/apps/{appId}/users'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
|
407
|
+
|
408
|
+
# query parameters
|
409
|
+
query_params = opts[:query_params] || {}
|
410
|
+
query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
|
411
|
+
query_params[:'take'] = opts[:'take'] if !opts[:'take'].nil?
|
412
|
+
query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
413
|
+
|
414
|
+
# header parameters
|
415
|
+
header_params = opts[:header_params] || {}
|
416
|
+
# HTTP header 'Accept' (if needed)
|
417
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
418
|
+
|
419
|
+
# form parameters
|
420
|
+
form_params = opts[:form_params] || {}
|
421
|
+
|
422
|
+
# http body (model)
|
423
|
+
post_body = opts[:debug_body]
|
424
|
+
|
425
|
+
# return_type
|
426
|
+
return_type = opts[:debug_return_type] || 'ListResponseDtoOfUserDto'
|
427
|
+
|
428
|
+
# auth_names
|
429
|
+
auth_names = opts[:debug_auth_names] || []
|
430
|
+
|
431
|
+
new_options = opts.merge(
|
432
|
+
:operation => :"UsersApi.users_get_users",
|
433
|
+
:header_params => header_params,
|
434
|
+
:query_params => query_params,
|
435
|
+
:form_params => form_params,
|
436
|
+
:body => post_body,
|
437
|
+
:auth_names => auth_names,
|
438
|
+
:return_type => return_type
|
439
|
+
)
|
440
|
+
|
441
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
442
|
+
if @api_client.config.debugging
|
443
|
+
@api_client.config.logger.debug "API called: UsersApi#users_get_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
444
|
+
end
|
445
|
+
return data, status_code, headers
|
446
|
+
end
|
447
|
+
|
448
|
+
# Add an allowed topic.
|
449
|
+
# @param app_id [String] The app where the users belong to.
|
450
|
+
# @param id [String] The user id.
|
451
|
+
# @param add_allowed_topic_dto [AddAllowedTopicDto] The upsert request.
|
452
|
+
# @param [Hash] opts the optional parameters
|
453
|
+
# @return [nil]
|
454
|
+
def users_post_allowed_topic(app_id, id, add_allowed_topic_dto, opts = {})
|
455
|
+
users_post_allowed_topic_with_http_info(app_id, id, add_allowed_topic_dto, opts)
|
456
|
+
nil
|
457
|
+
end
|
458
|
+
|
459
|
+
# Add an allowed topic.
|
460
|
+
# @param app_id [String] The app where the users belong to.
|
461
|
+
# @param id [String] The user id.
|
462
|
+
# @param add_allowed_topic_dto [AddAllowedTopicDto] The upsert request.
|
463
|
+
# @param [Hash] opts the optional parameters
|
464
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
465
|
+
def users_post_allowed_topic_with_http_info(app_id, id, add_allowed_topic_dto, opts = {})
|
466
|
+
if @api_client.config.debugging
|
467
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.users_post_allowed_topic ...'
|
468
|
+
end
|
469
|
+
# verify the required parameter 'app_id' is set
|
470
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
471
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.users_post_allowed_topic"
|
472
|
+
end
|
473
|
+
# verify the required parameter 'id' is set
|
474
|
+
if @api_client.config.client_side_validation && id.nil?
|
475
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_post_allowed_topic"
|
476
|
+
end
|
477
|
+
# verify the required parameter 'add_allowed_topic_dto' is set
|
478
|
+
if @api_client.config.client_side_validation && add_allowed_topic_dto.nil?
|
479
|
+
fail ArgumentError, "Missing the required parameter 'add_allowed_topic_dto' when calling UsersApi.users_post_allowed_topic"
|
480
|
+
end
|
481
|
+
# resource path
|
482
|
+
local_var_path = '/api/apps/{appId}/users/{id}/allowed-topics'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
483
|
+
|
484
|
+
# query parameters
|
485
|
+
query_params = opts[:query_params] || {}
|
486
|
+
|
487
|
+
# header parameters
|
488
|
+
header_params = opts[:header_params] || {}
|
489
|
+
# HTTP header 'Accept' (if needed)
|
490
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
491
|
+
# HTTP header 'Content-Type'
|
492
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
493
|
+
|
494
|
+
# form parameters
|
495
|
+
form_params = opts[:form_params] || {}
|
496
|
+
|
497
|
+
# http body (model)
|
498
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(add_allowed_topic_dto)
|
499
|
+
|
500
|
+
# return_type
|
501
|
+
return_type = opts[:debug_return_type]
|
502
|
+
|
503
|
+
# auth_names
|
504
|
+
auth_names = opts[:debug_auth_names] || []
|
505
|
+
|
506
|
+
new_options = opts.merge(
|
507
|
+
:operation => :"UsersApi.users_post_allowed_topic",
|
508
|
+
:header_params => header_params,
|
509
|
+
:query_params => query_params,
|
510
|
+
:form_params => form_params,
|
511
|
+
:body => post_body,
|
512
|
+
:auth_names => auth_names,
|
513
|
+
:return_type => return_type
|
514
|
+
)
|
515
|
+
|
516
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
517
|
+
if @api_client.config.debugging
|
518
|
+
@api_client.config.logger.debug "API called: UsersApi#users_post_allowed_topic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
519
|
+
end
|
520
|
+
return data, status_code, headers
|
521
|
+
end
|
522
|
+
|
523
|
+
# Upsert a user subscriptions.
|
524
|
+
# @param app_id [String] The app where the user belongs to.
|
525
|
+
# @param id [String] The user id.
|
526
|
+
# @param subscription_dto [SubscriptionDto] The subscription object.
|
527
|
+
# @param [Hash] opts the optional parameters
|
528
|
+
# @return [nil]
|
529
|
+
def users_post_subscription(app_id, id, subscription_dto, opts = {})
|
530
|
+
users_post_subscription_with_http_info(app_id, id, subscription_dto, opts)
|
531
|
+
nil
|
532
|
+
end
|
533
|
+
|
534
|
+
# Upsert a user subscriptions.
|
535
|
+
# @param app_id [String] The app where the user belongs to.
|
536
|
+
# @param id [String] The user id.
|
537
|
+
# @param subscription_dto [SubscriptionDto] The subscription object.
|
538
|
+
# @param [Hash] opts the optional parameters
|
539
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
540
|
+
def users_post_subscription_with_http_info(app_id, id, subscription_dto, opts = {})
|
541
|
+
if @api_client.config.debugging
|
542
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.users_post_subscription ...'
|
543
|
+
end
|
544
|
+
# verify the required parameter 'app_id' is set
|
545
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
546
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.users_post_subscription"
|
547
|
+
end
|
548
|
+
# verify the required parameter 'id' is set
|
549
|
+
if @api_client.config.client_side_validation && id.nil?
|
550
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UsersApi.users_post_subscription"
|
551
|
+
end
|
552
|
+
# verify the required parameter 'subscription_dto' is set
|
553
|
+
if @api_client.config.client_side_validation && subscription_dto.nil?
|
554
|
+
fail ArgumentError, "Missing the required parameter 'subscription_dto' when calling UsersApi.users_post_subscription"
|
555
|
+
end
|
556
|
+
# resource path
|
557
|
+
local_var_path = '/api/apps/{appId}/users/{id}/subscriptions'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
558
|
+
|
559
|
+
# query parameters
|
560
|
+
query_params = opts[:query_params] || {}
|
561
|
+
|
562
|
+
# header parameters
|
563
|
+
header_params = opts[:header_params] || {}
|
564
|
+
# HTTP header 'Accept' (if needed)
|
565
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
566
|
+
# HTTP header 'Content-Type'
|
567
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
568
|
+
|
569
|
+
# form parameters
|
570
|
+
form_params = opts[:form_params] || {}
|
571
|
+
|
572
|
+
# http body (model)
|
573
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(subscription_dto)
|
574
|
+
|
575
|
+
# return_type
|
576
|
+
return_type = opts[:debug_return_type]
|
577
|
+
|
578
|
+
# auth_names
|
579
|
+
auth_names = opts[:debug_auth_names] || []
|
580
|
+
|
581
|
+
new_options = opts.merge(
|
582
|
+
:operation => :"UsersApi.users_post_subscription",
|
583
|
+
:header_params => header_params,
|
584
|
+
:query_params => query_params,
|
585
|
+
:form_params => form_params,
|
586
|
+
:body => post_body,
|
587
|
+
:auth_names => auth_names,
|
588
|
+
:return_type => return_type
|
589
|
+
)
|
590
|
+
|
591
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
592
|
+
if @api_client.config.debugging
|
593
|
+
@api_client.config.logger.debug "API called: UsersApi#users_post_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
594
|
+
end
|
595
|
+
return data, status_code, headers
|
596
|
+
end
|
597
|
+
|
598
|
+
# Upsert users.
|
599
|
+
# @param app_id [String] The app where the users belong to.
|
600
|
+
# @param upsert_users_dto [UpsertUsersDto] The upsert request.
|
601
|
+
# @param [Hash] opts the optional parameters
|
602
|
+
# @return [Array<UserDto>]
|
603
|
+
def users_post_users(app_id, upsert_users_dto, opts = {})
|
604
|
+
data, _status_code, _headers = users_post_users_with_http_info(app_id, upsert_users_dto, opts)
|
605
|
+
data
|
606
|
+
end
|
607
|
+
|
608
|
+
# Upsert users.
|
609
|
+
# @param app_id [String] The app where the users belong to.
|
610
|
+
# @param upsert_users_dto [UpsertUsersDto] The upsert request.
|
611
|
+
# @param [Hash] opts the optional parameters
|
612
|
+
# @return [Array<(Array<UserDto>, Integer, Hash)>] Array<UserDto> data, response status code and response headers
|
613
|
+
def users_post_users_with_http_info(app_id, upsert_users_dto, opts = {})
|
614
|
+
if @api_client.config.debugging
|
615
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.users_post_users ...'
|
616
|
+
end
|
617
|
+
# verify the required parameter 'app_id' is set
|
618
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
619
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.users_post_users"
|
620
|
+
end
|
621
|
+
# verify the required parameter 'upsert_users_dto' is set
|
622
|
+
if @api_client.config.client_side_validation && upsert_users_dto.nil?
|
623
|
+
fail ArgumentError, "Missing the required parameter 'upsert_users_dto' when calling UsersApi.users_post_users"
|
624
|
+
end
|
625
|
+
# resource path
|
626
|
+
local_var_path = '/api/apps/{appId}/users'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
|
627
|
+
|
628
|
+
# query parameters
|
629
|
+
query_params = opts[:query_params] || {}
|
630
|
+
|
631
|
+
# header parameters
|
632
|
+
header_params = opts[:header_params] || {}
|
633
|
+
# HTTP header 'Accept' (if needed)
|
634
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
635
|
+
# HTTP header 'Content-Type'
|
636
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
637
|
+
|
638
|
+
# form parameters
|
639
|
+
form_params = opts[:form_params] || {}
|
640
|
+
|
641
|
+
# http body (model)
|
642
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(upsert_users_dto)
|
643
|
+
|
644
|
+
# return_type
|
645
|
+
return_type = opts[:debug_return_type] || 'Array<UserDto>'
|
646
|
+
|
647
|
+
# auth_names
|
648
|
+
auth_names = opts[:debug_auth_names] || []
|
649
|
+
|
650
|
+
new_options = opts.merge(
|
651
|
+
:operation => :"UsersApi.users_post_users",
|
652
|
+
:header_params => header_params,
|
653
|
+
:query_params => query_params,
|
654
|
+
:form_params => form_params,
|
655
|
+
:body => post_body,
|
656
|
+
:auth_names => auth_names,
|
657
|
+
:return_type => return_type
|
658
|
+
)
|
659
|
+
|
660
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
661
|
+
if @api_client.config.debugging
|
662
|
+
@api_client.config.logger.debug "API called: UsersApi#users_post_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
663
|
+
end
|
664
|
+
return data, status_code, headers
|
665
|
+
end
|
666
|
+
end
|
667
|
+
end
|