notifo-io 1.0.0.pre
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 +163 -0
- data/Rakefile +10 -0
- data/docs/AddAllowedTopicRequest.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/InlineObject.md +18 -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 +295 -0
- data/docs/MediaDto.md +28 -0
- data/docs/MediaType.md +15 -0
- data/docs/NotificationFormattingDto.md +32 -0
- data/docs/NotificationSettingDto.md +20 -0
- data/docs/PublishManyRequestDto.md +18 -0
- data/docs/PublishRequestDto.md +36 -0
- data/docs/ResizeMode.md +15 -0
- data/docs/SchedulingDto.md +24 -0
- data/docs/SchedulingType.md +15 -0
- data/docs/SubscribeDto.md +20 -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 +270 -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/UserDto.md +36 -0
- data/docs/UsersApi.md +610 -0
- data/git_push.sh +58 -0
- data/lib/notifo.rb +87 -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 +322 -0
- data/lib/notifo/api/templates_api.rb +228 -0
- data/lib/notifo/api/topics_api.rb +281 -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 +268 -0
- data/lib/notifo/models/add_allowed_topic_request.rb +219 -0
- data/lib/notifo/models/add_contributor_dto.rb +229 -0
- data/lib/notifo/models/app_contributor_dto.rb +239 -0
- data/lib/notifo/models/app_details_dto.rb +381 -0
- data/lib/notifo/models/app_dto.rb +273 -0
- data/lib/notifo/models/confirm_mode.rb +38 -0
- data/lib/notifo/models/create_email_template_dto.rb +219 -0
- data/lib/notifo/models/email_template_dto.rb +240 -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 +333 -0
- data/lib/notifo/models/inline_object.rb +219 -0
- data/lib/notifo/models/iso_day_of_week.rb +43 -0
- data/lib/notifo/models/list_response_dto_of_event_dto.rb +231 -0
- data/lib/notifo/models/list_response_dto_of_log_entry_dto.rb +231 -0
- data/lib/notifo/models/list_response_dto_of_media_dto.rb +231 -0
- data/lib/notifo/models/list_response_dto_of_subscription_dto.rb +231 -0
- data/lib/notifo/models/list_response_dto_of_template_dto.rb +231 -0
- data/lib/notifo/models/list_response_dto_of_topic_dto.rb +231 -0
- data/lib/notifo/models/list_response_dto_of_user_dto.rb +231 -0
- data/lib/notifo/models/log_entry_dto.rb +249 -0
- data/lib/notifo/models/media_dto.rb +269 -0
- data/lib/notifo/models/media_type.rb +39 -0
- data/lib/notifo/models/notification_formatting_dto.rb +295 -0
- data/lib/notifo/models/notification_setting_dto.rb +231 -0
- data/lib/notifo/models/publish_many_request_dto.rb +221 -0
- data/lib/notifo/models/publish_request_dto.rb +315 -0
- data/lib/notifo/models/resize_mode.rb +42 -0
- data/lib/notifo/models/scheduling_dto.rb +251 -0
- data/lib/notifo/models/scheduling_type.rb +37 -0
- data/lib/notifo/models/subscribe_dto.rb +229 -0
- data/lib/notifo/models/subscription_dto.rb +229 -0
- data/lib/notifo/models/template_dto.rb +239 -0
- data/lib/notifo/models/topic_dto.rb +239 -0
- data/lib/notifo/models/upsert_app_dto.rb +321 -0
- data/lib/notifo/models/upsert_template_dto.rb +240 -0
- data/lib/notifo/models/upsert_templates_dto.rb +221 -0
- data/lib/notifo/models/upsert_user_dto.rb +297 -0
- data/lib/notifo/models/upsert_users_dto.rb +221 -0
- data/lib/notifo/models/user_dto.rb +309 -0
- data/lib/notifo/version.rb +15 -0
- data/notifo-io-1.0.0.gem +0 -0
- data/notifo-io-1.0.0.pre.beta.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 +95 -0
- data/spec/api/templates_api_spec.rb +73 -0
- data/spec/api/topics_api_spec.rb +85 -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_request_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/inline_object_spec.rb +34 -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 +64 -0
- data/spec/models/media_type_spec.rb +28 -0
- data/spec/models/notification_formatting_dto_spec.rb +76 -0
- data/spec/models/notification_setting_dto_spec.rb +40 -0
- data/spec/models/publish_many_request_dto_spec.rb +34 -0
- data/spec/models/publish_request_dto_spec.rb +88 -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/subscribe_dto_spec.rb +40 -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/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 +294 -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.0.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,281 @@
|
|
|
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.0.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
|
+
# Gets 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 topics_get_subscription(topic, opts = {})
|
|
28
|
+
topics_get_subscription_with_http_info(topic, opts)
|
|
29
|
+
nil
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Gets 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 topics_get_subscription_with_http_info(topic, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: TopicsApi.topics_get_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 TopicsApi.topics_get_subscription"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/api/web/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 => :"TopicsApi.topics_get_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(:GET, local_var_path, new_options)
|
|
79
|
+
if @api_client.config.debugging
|
|
80
|
+
@api_client.config.logger.debug "API called: TopicsApi#topics_get_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
81
|
+
end
|
|
82
|
+
return data, status_code, headers
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Query topics.
|
|
86
|
+
# @param app_id [String] The app where the topics belongs to.
|
|
87
|
+
# @param [Hash] opts the optional parameters
|
|
88
|
+
# @option opts [String] :query The optional query to search for items.
|
|
89
|
+
# @option opts [Integer] :take The number of items to return.
|
|
90
|
+
# @option opts [Integer] :skip The number of items to skip.
|
|
91
|
+
# @return [ListResponseDtoOfTopicDto]
|
|
92
|
+
def topics_get_topics(app_id, opts = {})
|
|
93
|
+
data, _status_code, _headers = topics_get_topics_with_http_info(app_id, opts)
|
|
94
|
+
data
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Query topics.
|
|
98
|
+
# @param app_id [String] The app where the topics belongs to.
|
|
99
|
+
# @param [Hash] opts the optional parameters
|
|
100
|
+
# @option opts [String] :query The optional query to search for items.
|
|
101
|
+
# @option opts [Integer] :take The number of items to return.
|
|
102
|
+
# @option opts [Integer] :skip The number of items to skip.
|
|
103
|
+
# @return [Array<(ListResponseDtoOfTopicDto, Integer, Hash)>] ListResponseDtoOfTopicDto data, response status code and response headers
|
|
104
|
+
def topics_get_topics_with_http_info(app_id, opts = {})
|
|
105
|
+
if @api_client.config.debugging
|
|
106
|
+
@api_client.config.logger.debug 'Calling API: TopicsApi.topics_get_topics ...'
|
|
107
|
+
end
|
|
108
|
+
# verify the required parameter 'app_id' is set
|
|
109
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
110
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling TopicsApi.topics_get_topics"
|
|
111
|
+
end
|
|
112
|
+
# resource path
|
|
113
|
+
local_var_path = '/api/apps/{appId}/topics'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
|
|
114
|
+
|
|
115
|
+
# query parameters
|
|
116
|
+
query_params = opts[:query_params] || {}
|
|
117
|
+
query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
|
|
118
|
+
query_params[:'take'] = opts[:'take'] if !opts[:'take'].nil?
|
|
119
|
+
query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
|
|
120
|
+
|
|
121
|
+
# header parameters
|
|
122
|
+
header_params = opts[:header_params] || {}
|
|
123
|
+
# HTTP header 'Accept' (if needed)
|
|
124
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
125
|
+
|
|
126
|
+
# form parameters
|
|
127
|
+
form_params = opts[:form_params] || {}
|
|
128
|
+
|
|
129
|
+
# http body (model)
|
|
130
|
+
post_body = opts[:debug_body]
|
|
131
|
+
|
|
132
|
+
# return_type
|
|
133
|
+
return_type = opts[:debug_return_type] || 'ListResponseDtoOfTopicDto'
|
|
134
|
+
|
|
135
|
+
# auth_names
|
|
136
|
+
auth_names = opts[:debug_auth_names] || []
|
|
137
|
+
|
|
138
|
+
new_options = opts.merge(
|
|
139
|
+
:operation => :"TopicsApi.topics_get_topics",
|
|
140
|
+
:header_params => header_params,
|
|
141
|
+
:query_params => query_params,
|
|
142
|
+
:form_params => form_params,
|
|
143
|
+
:body => post_body,
|
|
144
|
+
:auth_names => auth_names,
|
|
145
|
+
:return_type => return_type
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
149
|
+
if @api_client.config.debugging
|
|
150
|
+
@api_client.config.logger.debug "API called: TopicsApi#topics_get_topics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
151
|
+
end
|
|
152
|
+
return data, status_code, headers
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Creates a user subscription.
|
|
156
|
+
# User Id and App Id are resolved using the API token.
|
|
157
|
+
# @param topic [String] The topic path.
|
|
158
|
+
# @param [Hash] opts the optional parameters
|
|
159
|
+
# @return [nil]
|
|
160
|
+
def topics_subscribe(topic, opts = {})
|
|
161
|
+
topics_subscribe_with_http_info(topic, opts)
|
|
162
|
+
nil
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Creates a user subscription.
|
|
166
|
+
# User Id and App Id are resolved using the API token.
|
|
167
|
+
# @param topic [String] The topic path.
|
|
168
|
+
# @param [Hash] opts the optional parameters
|
|
169
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
170
|
+
def topics_subscribe_with_http_info(topic, opts = {})
|
|
171
|
+
if @api_client.config.debugging
|
|
172
|
+
@api_client.config.logger.debug 'Calling API: TopicsApi.topics_subscribe ...'
|
|
173
|
+
end
|
|
174
|
+
# verify the required parameter 'topic' is set
|
|
175
|
+
if @api_client.config.client_side_validation && topic.nil?
|
|
176
|
+
fail ArgumentError, "Missing the required parameter 'topic' when calling TopicsApi.topics_subscribe"
|
|
177
|
+
end
|
|
178
|
+
# resource path
|
|
179
|
+
local_var_path = '/api/web/subscriptions/{topic}'.sub('{' + 'topic' + '}', CGI.escape(topic.to_s))
|
|
180
|
+
|
|
181
|
+
# query parameters
|
|
182
|
+
query_params = opts[:query_params] || {}
|
|
183
|
+
|
|
184
|
+
# header parameters
|
|
185
|
+
header_params = opts[:header_params] || {}
|
|
186
|
+
# HTTP header 'Accept' (if needed)
|
|
187
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
188
|
+
|
|
189
|
+
# form parameters
|
|
190
|
+
form_params = opts[:form_params] || {}
|
|
191
|
+
|
|
192
|
+
# http body (model)
|
|
193
|
+
post_body = opts[:debug_body]
|
|
194
|
+
|
|
195
|
+
# return_type
|
|
196
|
+
return_type = opts[:debug_return_type]
|
|
197
|
+
|
|
198
|
+
# auth_names
|
|
199
|
+
auth_names = opts[:debug_auth_names] || []
|
|
200
|
+
|
|
201
|
+
new_options = opts.merge(
|
|
202
|
+
:operation => :"TopicsApi.topics_subscribe",
|
|
203
|
+
:header_params => header_params,
|
|
204
|
+
:query_params => query_params,
|
|
205
|
+
:form_params => form_params,
|
|
206
|
+
:body => post_body,
|
|
207
|
+
:auth_names => auth_names,
|
|
208
|
+
:return_type => return_type
|
|
209
|
+
)
|
|
210
|
+
|
|
211
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
212
|
+
if @api_client.config.debugging
|
|
213
|
+
@api_client.config.logger.debug "API called: TopicsApi#topics_subscribe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
214
|
+
end
|
|
215
|
+
return data, status_code, headers
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
# Deletes a user subscription.
|
|
219
|
+
# User Id and App Id are resolved using the API token.
|
|
220
|
+
# @param topic [String] The topic path.
|
|
221
|
+
# @param [Hash] opts the optional parameters
|
|
222
|
+
# @return [nil]
|
|
223
|
+
def topics_unsubscribe(topic, opts = {})
|
|
224
|
+
topics_unsubscribe_with_http_info(topic, opts)
|
|
225
|
+
nil
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Deletes a user subscription.
|
|
229
|
+
# User Id and App Id are resolved using the API token.
|
|
230
|
+
# @param topic [String] The topic path.
|
|
231
|
+
# @param [Hash] opts the optional parameters
|
|
232
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
233
|
+
def topics_unsubscribe_with_http_info(topic, opts = {})
|
|
234
|
+
if @api_client.config.debugging
|
|
235
|
+
@api_client.config.logger.debug 'Calling API: TopicsApi.topics_unsubscribe ...'
|
|
236
|
+
end
|
|
237
|
+
# verify the required parameter 'topic' is set
|
|
238
|
+
if @api_client.config.client_side_validation && topic.nil?
|
|
239
|
+
fail ArgumentError, "Missing the required parameter 'topic' when calling TopicsApi.topics_unsubscribe"
|
|
240
|
+
end
|
|
241
|
+
# resource path
|
|
242
|
+
local_var_path = '/api/web/subscriptions/{topic}'.sub('{' + 'topic' + '}', CGI.escape(topic.to_s))
|
|
243
|
+
|
|
244
|
+
# query parameters
|
|
245
|
+
query_params = opts[:query_params] || {}
|
|
246
|
+
|
|
247
|
+
# header parameters
|
|
248
|
+
header_params = opts[:header_params] || {}
|
|
249
|
+
# HTTP header 'Accept' (if needed)
|
|
250
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
251
|
+
|
|
252
|
+
# form parameters
|
|
253
|
+
form_params = opts[:form_params] || {}
|
|
254
|
+
|
|
255
|
+
# http body (model)
|
|
256
|
+
post_body = opts[:debug_body]
|
|
257
|
+
|
|
258
|
+
# return_type
|
|
259
|
+
return_type = opts[:debug_return_type]
|
|
260
|
+
|
|
261
|
+
# auth_names
|
|
262
|
+
auth_names = opts[:debug_auth_names] || []
|
|
263
|
+
|
|
264
|
+
new_options = opts.merge(
|
|
265
|
+
:operation => :"TopicsApi.topics_unsubscribe",
|
|
266
|
+
:header_params => header_params,
|
|
267
|
+
:query_params => query_params,
|
|
268
|
+
:form_params => form_params,
|
|
269
|
+
:body => post_body,
|
|
270
|
+
:auth_names => auth_names,
|
|
271
|
+
:return_type => return_type
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
275
|
+
if @api_client.config.debugging
|
|
276
|
+
@api_client.config.logger.debug "API called: TopicsApi#topics_unsubscribe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
277
|
+
end
|
|
278
|
+
return data, status_code, headers
|
|
279
|
+
end
|
|
280
|
+
end
|
|
281
|
+
end
|