notifo-io-easierlife 1.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 +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,228 @@
|
|
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 TemplatesApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Delete a template.
|
23
|
+
# @param app_id [String] The app where the templates belong to.
|
24
|
+
# @param code [String] The template code to delete.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [ListResponseDtoOfTemplateDto]
|
27
|
+
def templates_delete_template(app_id, code, opts = {})
|
28
|
+
data, _status_code, _headers = templates_delete_template_with_http_info(app_id, code, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Delete a template.
|
33
|
+
# @param app_id [String] The app where the templates belong to.
|
34
|
+
# @param code [String] The template code to delete.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(ListResponseDtoOfTemplateDto, Integer, Hash)>] ListResponseDtoOfTemplateDto data, response status code and response headers
|
37
|
+
def templates_delete_template_with_http_info(app_id, code, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.templates_delete_template ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'app_id' is set
|
42
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling TemplatesApi.templates_delete_template"
|
44
|
+
end
|
45
|
+
# verify the required parameter 'code' is set
|
46
|
+
if @api_client.config.client_side_validation && code.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'code' when calling TemplatesApi.templates_delete_template"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '/api/apps/{appId}/templates/{code}'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s)).sub('{' + 'code' + '}', CGI.escape(code.to_s))
|
51
|
+
|
52
|
+
# query parameters
|
53
|
+
query_params = opts[:query_params] || {}
|
54
|
+
|
55
|
+
# header parameters
|
56
|
+
header_params = opts[:header_params] || {}
|
57
|
+
# HTTP header 'Accept' (if needed)
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
59
|
+
|
60
|
+
# form parameters
|
61
|
+
form_params = opts[:form_params] || {}
|
62
|
+
|
63
|
+
# http body (model)
|
64
|
+
post_body = opts[:debug_body]
|
65
|
+
|
66
|
+
# return_type
|
67
|
+
return_type = opts[:debug_return_type] || 'ListResponseDtoOfTemplateDto'
|
68
|
+
|
69
|
+
# auth_names
|
70
|
+
auth_names = opts[:debug_auth_names] || []
|
71
|
+
|
72
|
+
new_options = opts.merge(
|
73
|
+
:operation => :"TemplatesApi.templates_delete_template",
|
74
|
+
:header_params => header_params,
|
75
|
+
:query_params => query_params,
|
76
|
+
:form_params => form_params,
|
77
|
+
:body => post_body,
|
78
|
+
:auth_names => auth_names,
|
79
|
+
:return_type => return_type
|
80
|
+
)
|
81
|
+
|
82
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
83
|
+
if @api_client.config.debugging
|
84
|
+
@api_client.config.logger.debug "API called: TemplatesApi#templates_delete_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
85
|
+
end
|
86
|
+
return data, status_code, headers
|
87
|
+
end
|
88
|
+
|
89
|
+
# Query templates.
|
90
|
+
# @param app_id [String] The app where the templates belongs to.
|
91
|
+
# @param [Hash] opts the optional parameters
|
92
|
+
# @option opts [String] :query The optional query to search for items.
|
93
|
+
# @option opts [Integer] :take The number of items to return.
|
94
|
+
# @option opts [Integer] :skip The number of items to skip.
|
95
|
+
# @return [ListResponseDtoOfTemplateDto]
|
96
|
+
def templates_get_templates(app_id, opts = {})
|
97
|
+
data, _status_code, _headers = templates_get_templates_with_http_info(app_id, opts)
|
98
|
+
data
|
99
|
+
end
|
100
|
+
|
101
|
+
# Query templates.
|
102
|
+
# @param app_id [String] The app where the templates belongs to.
|
103
|
+
# @param [Hash] opts the optional parameters
|
104
|
+
# @option opts [String] :query The optional query to search for items.
|
105
|
+
# @option opts [Integer] :take The number of items to return.
|
106
|
+
# @option opts [Integer] :skip The number of items to skip.
|
107
|
+
# @return [Array<(ListResponseDtoOfTemplateDto, Integer, Hash)>] ListResponseDtoOfTemplateDto data, response status code and response headers
|
108
|
+
def templates_get_templates_with_http_info(app_id, opts = {})
|
109
|
+
if @api_client.config.debugging
|
110
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.templates_get_templates ...'
|
111
|
+
end
|
112
|
+
# verify the required parameter 'app_id' is set
|
113
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
114
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling TemplatesApi.templates_get_templates"
|
115
|
+
end
|
116
|
+
# resource path
|
117
|
+
local_var_path = '/api/apps/{appId}/templates'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
|
118
|
+
|
119
|
+
# query parameters
|
120
|
+
query_params = opts[:query_params] || {}
|
121
|
+
query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
|
122
|
+
query_params[:'take'] = opts[:'take'] if !opts[:'take'].nil?
|
123
|
+
query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
124
|
+
|
125
|
+
# header parameters
|
126
|
+
header_params = opts[:header_params] || {}
|
127
|
+
# HTTP header 'Accept' (if needed)
|
128
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
129
|
+
|
130
|
+
# form parameters
|
131
|
+
form_params = opts[:form_params] || {}
|
132
|
+
|
133
|
+
# http body (model)
|
134
|
+
post_body = opts[:debug_body]
|
135
|
+
|
136
|
+
# return_type
|
137
|
+
return_type = opts[:debug_return_type] || 'ListResponseDtoOfTemplateDto'
|
138
|
+
|
139
|
+
# auth_names
|
140
|
+
auth_names = opts[:debug_auth_names] || []
|
141
|
+
|
142
|
+
new_options = opts.merge(
|
143
|
+
:operation => :"TemplatesApi.templates_get_templates",
|
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 => return_type
|
150
|
+
)
|
151
|
+
|
152
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
153
|
+
if @api_client.config.debugging
|
154
|
+
@api_client.config.logger.debug "API called: TemplatesApi#templates_get_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
155
|
+
end
|
156
|
+
return data, status_code, headers
|
157
|
+
end
|
158
|
+
|
159
|
+
# Upsert templates.
|
160
|
+
# @param app_id [String] The app where the templates belong to.
|
161
|
+
# @param upsert_templates_dto [UpsertTemplatesDto] The upsert request.
|
162
|
+
# @param [Hash] opts the optional parameters
|
163
|
+
# @return [Array<TemplateDto>]
|
164
|
+
def templates_post_templates(app_id, upsert_templates_dto, opts = {})
|
165
|
+
data, _status_code, _headers = templates_post_templates_with_http_info(app_id, upsert_templates_dto, opts)
|
166
|
+
data
|
167
|
+
end
|
168
|
+
|
169
|
+
# Upsert templates.
|
170
|
+
# @param app_id [String] The app where the templates belong to.
|
171
|
+
# @param upsert_templates_dto [UpsertTemplatesDto] The upsert request.
|
172
|
+
# @param [Hash] opts the optional parameters
|
173
|
+
# @return [Array<(Array<TemplateDto>, Integer, Hash)>] Array<TemplateDto> data, response status code and response headers
|
174
|
+
def templates_post_templates_with_http_info(app_id, upsert_templates_dto, opts = {})
|
175
|
+
if @api_client.config.debugging
|
176
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.templates_post_templates ...'
|
177
|
+
end
|
178
|
+
# verify the required parameter 'app_id' is set
|
179
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
180
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling TemplatesApi.templates_post_templates"
|
181
|
+
end
|
182
|
+
# verify the required parameter 'upsert_templates_dto' is set
|
183
|
+
if @api_client.config.client_side_validation && upsert_templates_dto.nil?
|
184
|
+
fail ArgumentError, "Missing the required parameter 'upsert_templates_dto' when calling TemplatesApi.templates_post_templates"
|
185
|
+
end
|
186
|
+
# resource path
|
187
|
+
local_var_path = '/api/apps/{appId}/templates'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
|
188
|
+
|
189
|
+
# query parameters
|
190
|
+
query_params = opts[:query_params] || {}
|
191
|
+
|
192
|
+
# header parameters
|
193
|
+
header_params = opts[:header_params] || {}
|
194
|
+
# HTTP header 'Accept' (if needed)
|
195
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
196
|
+
# HTTP header 'Content-Type'
|
197
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
198
|
+
|
199
|
+
# form parameters
|
200
|
+
form_params = opts[:form_params] || {}
|
201
|
+
|
202
|
+
# http body (model)
|
203
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(upsert_templates_dto)
|
204
|
+
|
205
|
+
# return_type
|
206
|
+
return_type = opts[:debug_return_type] || 'Array<TemplateDto>'
|
207
|
+
|
208
|
+
# auth_names
|
209
|
+
auth_names = opts[:debug_auth_names] || []
|
210
|
+
|
211
|
+
new_options = opts.merge(
|
212
|
+
:operation => :"TemplatesApi.templates_post_templates",
|
213
|
+
:header_params => header_params,
|
214
|
+
:query_params => query_params,
|
215
|
+
:form_params => form_params,
|
216
|
+
:body => post_body,
|
217
|
+
:auth_names => auth_names,
|
218
|
+
:return_type => return_type
|
219
|
+
)
|
220
|
+
|
221
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
222
|
+
if @api_client.config.debugging
|
223
|
+
@api_client.config.logger.debug "API called: TemplatesApi#templates_post_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
224
|
+
end
|
225
|
+
return data, status_code, headers
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|
@@ -0,0 +1,92 @@
|
|
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 TopicsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Query topics.
|
23
|
+
# @param app_id [String] The app where the topics belongs to.
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [String] :query The optional query to search for items.
|
26
|
+
# @option opts [Integer] :take The number of items to return.
|
27
|
+
# @option opts [Integer] :skip The number of items to skip.
|
28
|
+
# @return [ListResponseDtoOfTopicDto]
|
29
|
+
def topics_get_topics(app_id, opts = {})
|
30
|
+
data, _status_code, _headers = topics_get_topics_with_http_info(app_id, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Query topics.
|
35
|
+
# @param app_id [String] The app where the topics belongs to.
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @option opts [String] :query The optional query to search for items.
|
38
|
+
# @option opts [Integer] :take The number of items to return.
|
39
|
+
# @option opts [Integer] :skip The number of items to skip.
|
40
|
+
# @return [Array<(ListResponseDtoOfTopicDto, Integer, Hash)>] ListResponseDtoOfTopicDto data, response status code and response headers
|
41
|
+
def topics_get_topics_with_http_info(app_id, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: TopicsApi.topics_get_topics ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'app_id' is set
|
46
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling TopicsApi.topics_get_topics"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '/api/apps/{appId}/topics'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
|
51
|
+
|
52
|
+
# query parameters
|
53
|
+
query_params = opts[:query_params] || {}
|
54
|
+
query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
|
55
|
+
query_params[:'take'] = opts[:'take'] if !opts[:'take'].nil?
|
56
|
+
query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
57
|
+
|
58
|
+
# header parameters
|
59
|
+
header_params = opts[:header_params] || {}
|
60
|
+
# HTTP header 'Accept' (if needed)
|
61
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
62
|
+
|
63
|
+
# form parameters
|
64
|
+
form_params = opts[:form_params] || {}
|
65
|
+
|
66
|
+
# http body (model)
|
67
|
+
post_body = opts[:debug_body]
|
68
|
+
|
69
|
+
# return_type
|
70
|
+
return_type = opts[:debug_return_type] || 'ListResponseDtoOfTopicDto'
|
71
|
+
|
72
|
+
# auth_names
|
73
|
+
auth_names = opts[:debug_auth_names] || []
|
74
|
+
|
75
|
+
new_options = opts.merge(
|
76
|
+
:operation => :"TopicsApi.topics_get_topics",
|
77
|
+
:header_params => header_params,
|
78
|
+
:query_params => query_params,
|
79
|
+
:form_params => form_params,
|
80
|
+
:body => post_body,
|
81
|
+
:auth_names => auth_names,
|
82
|
+
:return_type => return_type
|
83
|
+
)
|
84
|
+
|
85
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
86
|
+
if @api_client.config.debugging
|
87
|
+
@api_client.config.logger.debug "API called: TopicsApi#topics_get_topics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
88
|
+
end
|
89
|
+
return data, status_code, headers
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
@@ -0,0 +1,331 @@
|
|
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 UserApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Deletes a user subscription.
|
23
|
+
# User Id and App Id are resolved using the API token.
|
24
|
+
# @param topic [String] The topic path.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [nil]
|
27
|
+
def user_delete_subscription(topic, opts = {})
|
28
|
+
user_delete_subscription_with_http_info(topic, opts)
|
29
|
+
nil
|
30
|
+
end
|
31
|
+
|
32
|
+
# Deletes a user subscription.
|
33
|
+
# User Id and App Id are resolved using the API token.
|
34
|
+
# @param topic [String] The topic path.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
37
|
+
def user_delete_subscription_with_http_info(topic, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_delete_subscription ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'topic' is set
|
42
|
+
if @api_client.config.client_side_validation && topic.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'topic' when calling UserApi.user_delete_subscription"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/api/me/subscriptions/{topic}'.sub('{' + 'topic' + '}', CGI.escape(topic.to_s))
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = opts[:form_params] || {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = opts[:debug_body]
|
61
|
+
|
62
|
+
# return_type
|
63
|
+
return_type = opts[:debug_return_type]
|
64
|
+
|
65
|
+
# auth_names
|
66
|
+
auth_names = opts[:debug_auth_names] || []
|
67
|
+
|
68
|
+
new_options = opts.merge(
|
69
|
+
:operation => :"UserApi.user_delete_subscription",
|
70
|
+
:header_params => header_params,
|
71
|
+
:query_params => query_params,
|
72
|
+
:form_params => form_params,
|
73
|
+
:body => post_body,
|
74
|
+
:auth_names => auth_names,
|
75
|
+
:return_type => return_type
|
76
|
+
)
|
77
|
+
|
78
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
79
|
+
if @api_client.config.debugging
|
80
|
+
@api_client.config.logger.debug "API called: UserApi#user_delete_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
81
|
+
end
|
82
|
+
return data, status_code, headers
|
83
|
+
end
|
84
|
+
|
85
|
+
# Gets a user subscription.
|
86
|
+
# User Id and App Id are resolved using the API token.
|
87
|
+
# @param topic [String] The topic path.
|
88
|
+
# @param [Hash] opts the optional parameters
|
89
|
+
# @return [SubscriptionDto]
|
90
|
+
def user_get_subscription(topic, opts = {})
|
91
|
+
data, _status_code, _headers = user_get_subscription_with_http_info(topic, opts)
|
92
|
+
data
|
93
|
+
end
|
94
|
+
|
95
|
+
# Gets a user subscription.
|
96
|
+
# User Id and App Id are resolved using the API token.
|
97
|
+
# @param topic [String] The topic path.
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @return [Array<(SubscriptionDto, Integer, Hash)>] SubscriptionDto data, response status code and response headers
|
100
|
+
def user_get_subscription_with_http_info(topic, opts = {})
|
101
|
+
if @api_client.config.debugging
|
102
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_get_subscription ...'
|
103
|
+
end
|
104
|
+
# verify the required parameter 'topic' is set
|
105
|
+
if @api_client.config.client_side_validation && topic.nil?
|
106
|
+
fail ArgumentError, "Missing the required parameter 'topic' when calling UserApi.user_get_subscription"
|
107
|
+
end
|
108
|
+
# resource path
|
109
|
+
local_var_path = '/api/me/subscriptions/{topic}'.sub('{' + 'topic' + '}', CGI.escape(topic.to_s))
|
110
|
+
|
111
|
+
# query parameters
|
112
|
+
query_params = opts[:query_params] || {}
|
113
|
+
|
114
|
+
# header parameters
|
115
|
+
header_params = opts[:header_params] || {}
|
116
|
+
# HTTP header 'Accept' (if needed)
|
117
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
118
|
+
|
119
|
+
# form parameters
|
120
|
+
form_params = opts[:form_params] || {}
|
121
|
+
|
122
|
+
# http body (model)
|
123
|
+
post_body = opts[:debug_body]
|
124
|
+
|
125
|
+
# return_type
|
126
|
+
return_type = opts[:debug_return_type] || 'SubscriptionDto'
|
127
|
+
|
128
|
+
# auth_names
|
129
|
+
auth_names = opts[:debug_auth_names] || []
|
130
|
+
|
131
|
+
new_options = opts.merge(
|
132
|
+
:operation => :"UserApi.user_get_subscription",
|
133
|
+
:header_params => header_params,
|
134
|
+
:query_params => query_params,
|
135
|
+
:form_params => form_params,
|
136
|
+
:body => post_body,
|
137
|
+
:auth_names => auth_names,
|
138
|
+
:return_type => return_type
|
139
|
+
)
|
140
|
+
|
141
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
142
|
+
if @api_client.config.debugging
|
143
|
+
@api_client.config.logger.debug "API called: UserApi#user_get_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
144
|
+
end
|
145
|
+
return data, status_code, headers
|
146
|
+
end
|
147
|
+
|
148
|
+
# Get the current user.
|
149
|
+
# @param [Hash] opts the optional parameters
|
150
|
+
# @return [ProfileDto]
|
151
|
+
def user_get_user(opts = {})
|
152
|
+
data, _status_code, _headers = user_get_user_with_http_info(opts)
|
153
|
+
data
|
154
|
+
end
|
155
|
+
|
156
|
+
# Get the current user.
|
157
|
+
# @param [Hash] opts the optional parameters
|
158
|
+
# @return [Array<(ProfileDto, Integer, Hash)>] ProfileDto data, response status code and response headers
|
159
|
+
def user_get_user_with_http_info(opts = {})
|
160
|
+
if @api_client.config.debugging
|
161
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_get_user ...'
|
162
|
+
end
|
163
|
+
# resource path
|
164
|
+
local_var_path = '/api/me'
|
165
|
+
|
166
|
+
# query parameters
|
167
|
+
query_params = opts[:query_params] || {}
|
168
|
+
|
169
|
+
# header parameters
|
170
|
+
header_params = opts[:header_params] || {}
|
171
|
+
# HTTP header 'Accept' (if needed)
|
172
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
173
|
+
|
174
|
+
# form parameters
|
175
|
+
form_params = opts[:form_params] || {}
|
176
|
+
|
177
|
+
# http body (model)
|
178
|
+
post_body = opts[:debug_body]
|
179
|
+
|
180
|
+
# return_type
|
181
|
+
return_type = opts[:debug_return_type] || 'ProfileDto'
|
182
|
+
|
183
|
+
# auth_names
|
184
|
+
auth_names = opts[:debug_auth_names] || []
|
185
|
+
|
186
|
+
new_options = opts.merge(
|
187
|
+
:operation => :"UserApi.user_get_user",
|
188
|
+
:header_params => header_params,
|
189
|
+
:query_params => query_params,
|
190
|
+
:form_params => form_params,
|
191
|
+
:body => post_body,
|
192
|
+
:auth_names => auth_names,
|
193
|
+
:return_type => return_type
|
194
|
+
)
|
195
|
+
|
196
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
197
|
+
if @api_client.config.debugging
|
198
|
+
@api_client.config.logger.debug "API called: UserApi#user_get_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
199
|
+
end
|
200
|
+
return data, status_code, headers
|
201
|
+
end
|
202
|
+
|
203
|
+
# Creates a user subscription.
|
204
|
+
# User Id and App Id are resolved using the API token.
|
205
|
+
# @param subscription_dto [SubscriptionDto] The subscription settings.
|
206
|
+
# @param [Hash] opts the optional parameters
|
207
|
+
# @return [nil]
|
208
|
+
def user_post_subscription(subscription_dto, opts = {})
|
209
|
+
user_post_subscription_with_http_info(subscription_dto, opts)
|
210
|
+
nil
|
211
|
+
end
|
212
|
+
|
213
|
+
# Creates a user subscription.
|
214
|
+
# User Id and App Id are resolved using the API token.
|
215
|
+
# @param subscription_dto [SubscriptionDto] The subscription settings.
|
216
|
+
# @param [Hash] opts the optional parameters
|
217
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
218
|
+
def user_post_subscription_with_http_info(subscription_dto, opts = {})
|
219
|
+
if @api_client.config.debugging
|
220
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_post_subscription ...'
|
221
|
+
end
|
222
|
+
# verify the required parameter 'subscription_dto' is set
|
223
|
+
if @api_client.config.client_side_validation && subscription_dto.nil?
|
224
|
+
fail ArgumentError, "Missing the required parameter 'subscription_dto' when calling UserApi.user_post_subscription"
|
225
|
+
end
|
226
|
+
# resource path
|
227
|
+
local_var_path = '/api/me/subscriptions'
|
228
|
+
|
229
|
+
# query parameters
|
230
|
+
query_params = opts[:query_params] || {}
|
231
|
+
|
232
|
+
# header parameters
|
233
|
+
header_params = opts[:header_params] || {}
|
234
|
+
# HTTP header 'Accept' (if needed)
|
235
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
236
|
+
# HTTP header 'Content-Type'
|
237
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
238
|
+
|
239
|
+
# form parameters
|
240
|
+
form_params = opts[:form_params] || {}
|
241
|
+
|
242
|
+
# http body (model)
|
243
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(subscription_dto)
|
244
|
+
|
245
|
+
# return_type
|
246
|
+
return_type = opts[:debug_return_type]
|
247
|
+
|
248
|
+
# auth_names
|
249
|
+
auth_names = opts[:debug_auth_names] || []
|
250
|
+
|
251
|
+
new_options = opts.merge(
|
252
|
+
:operation => :"UserApi.user_post_subscription",
|
253
|
+
:header_params => header_params,
|
254
|
+
:query_params => query_params,
|
255
|
+
:form_params => form_params,
|
256
|
+
:body => post_body,
|
257
|
+
:auth_names => auth_names,
|
258
|
+
:return_type => return_type
|
259
|
+
)
|
260
|
+
|
261
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
262
|
+
if @api_client.config.debugging
|
263
|
+
@api_client.config.logger.debug "API called: UserApi#user_post_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
264
|
+
end
|
265
|
+
return data, status_code, headers
|
266
|
+
end
|
267
|
+
|
268
|
+
# Update the user.
|
269
|
+
# @param update_profile_dto [UpdateProfileDto] The upsert request.
|
270
|
+
# @param [Hash] opts the optional parameters
|
271
|
+
# @return [ProfileDto]
|
272
|
+
def user_post_user(update_profile_dto, opts = {})
|
273
|
+
data, _status_code, _headers = user_post_user_with_http_info(update_profile_dto, opts)
|
274
|
+
data
|
275
|
+
end
|
276
|
+
|
277
|
+
# Update the user.
|
278
|
+
# @param update_profile_dto [UpdateProfileDto] The upsert request.
|
279
|
+
# @param [Hash] opts the optional parameters
|
280
|
+
# @return [Array<(ProfileDto, Integer, Hash)>] ProfileDto data, response status code and response headers
|
281
|
+
def user_post_user_with_http_info(update_profile_dto, opts = {})
|
282
|
+
if @api_client.config.debugging
|
283
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_post_user ...'
|
284
|
+
end
|
285
|
+
# verify the required parameter 'update_profile_dto' is set
|
286
|
+
if @api_client.config.client_side_validation && update_profile_dto.nil?
|
287
|
+
fail ArgumentError, "Missing the required parameter 'update_profile_dto' when calling UserApi.user_post_user"
|
288
|
+
end
|
289
|
+
# resource path
|
290
|
+
local_var_path = '/api/me'
|
291
|
+
|
292
|
+
# query parameters
|
293
|
+
query_params = opts[:query_params] || {}
|
294
|
+
|
295
|
+
# header parameters
|
296
|
+
header_params = opts[:header_params] || {}
|
297
|
+
# HTTP header 'Accept' (if needed)
|
298
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
299
|
+
# HTTP header 'Content-Type'
|
300
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
301
|
+
|
302
|
+
# form parameters
|
303
|
+
form_params = opts[:form_params] || {}
|
304
|
+
|
305
|
+
# http body (model)
|
306
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_profile_dto)
|
307
|
+
|
308
|
+
# return_type
|
309
|
+
return_type = opts[:debug_return_type] || 'ProfileDto'
|
310
|
+
|
311
|
+
# auth_names
|
312
|
+
auth_names = opts[:debug_auth_names] || []
|
313
|
+
|
314
|
+
new_options = opts.merge(
|
315
|
+
:operation => :"UserApi.user_post_user",
|
316
|
+
:header_params => header_params,
|
317
|
+
:query_params => query_params,
|
318
|
+
:form_params => form_params,
|
319
|
+
:body => post_body,
|
320
|
+
:auth_names => auth_names,
|
321
|
+
:return_type => return_type
|
322
|
+
)
|
323
|
+
|
324
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
325
|
+
if @api_client.config.debugging
|
326
|
+
@api_client.config.logger.debug "API called: UserApi#user_post_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
327
|
+
end
|
328
|
+
return data, status_code, headers
|
329
|
+
end
|
330
|
+
end
|
331
|
+
end
|