notifo-io 1.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +163 -0
  4. data/Rakefile +10 -0
  5. data/docs/AddAllowedTopicRequest.md +18 -0
  6. data/docs/AddContributorDto.md +20 -0
  7. data/docs/AppContributorDto.md +22 -0
  8. data/docs/AppDetailsDto.md +48 -0
  9. data/docs/AppDto.md +28 -0
  10. data/docs/AppsApi.md +646 -0
  11. data/docs/ConfigsApi.md +127 -0
  12. data/docs/ConfirmMode.md +15 -0
  13. data/docs/CreateEmailTemplateDto.md +18 -0
  14. data/docs/EmailTemplateDto.md +22 -0
  15. data/docs/EmailVerificationStatus.md +15 -0
  16. data/docs/ErrorDto.md +26 -0
  17. data/docs/EventDto.md +40 -0
  18. data/docs/EventsApi.md +142 -0
  19. data/docs/InlineObject.md +18 -0
  20. data/docs/IsoDayOfWeek.md +15 -0
  21. data/docs/ListResponseDtoOfEventDto.md +20 -0
  22. data/docs/ListResponseDtoOfLogEntryDto.md +20 -0
  23. data/docs/ListResponseDtoOfMediaDto.md +20 -0
  24. data/docs/ListResponseDtoOfSubscriptionDto.md +20 -0
  25. data/docs/ListResponseDtoOfTemplateDto.md +20 -0
  26. data/docs/ListResponseDtoOfTopicDto.md +20 -0
  27. data/docs/ListResponseDtoOfUserDto.md +20 -0
  28. data/docs/LogEntryDto.md +24 -0
  29. data/docs/LogsApi.md +78 -0
  30. data/docs/MediaApi.md +295 -0
  31. data/docs/MediaDto.md +28 -0
  32. data/docs/MediaType.md +15 -0
  33. data/docs/NotificationFormattingDto.md +32 -0
  34. data/docs/NotificationSettingDto.md +20 -0
  35. data/docs/PublishManyRequestDto.md +18 -0
  36. data/docs/PublishRequestDto.md +36 -0
  37. data/docs/ResizeMode.md +15 -0
  38. data/docs/SchedulingDto.md +24 -0
  39. data/docs/SchedulingType.md +15 -0
  40. data/docs/SubscribeDto.md +20 -0
  41. data/docs/SubscriptionDto.md +20 -0
  42. data/docs/TemplateDto.md +22 -0
  43. data/docs/TemplatesApi.md +208 -0
  44. data/docs/TopicDto.md +22 -0
  45. data/docs/TopicsApi.md +270 -0
  46. data/docs/UpsertAppDto.md +36 -0
  47. data/docs/UpsertTemplateDto.md +22 -0
  48. data/docs/UpsertTemplatesDto.md +18 -0
  49. data/docs/UpsertUserDto.md +32 -0
  50. data/docs/UpsertUsersDto.md +18 -0
  51. data/docs/UserDto.md +36 -0
  52. data/docs/UsersApi.md +610 -0
  53. data/git_push.sh +58 -0
  54. data/lib/notifo.rb +87 -0
  55. data/lib/notifo/api/apps_api.rb +678 -0
  56. data/lib/notifo/api/configs_api.rb +132 -0
  57. data/lib/notifo/api/events_api.rb +161 -0
  58. data/lib/notifo/api/logs_api.rb +92 -0
  59. data/lib/notifo/api/media_api.rb +322 -0
  60. data/lib/notifo/api/templates_api.rb +228 -0
  61. data/lib/notifo/api/topics_api.rb +281 -0
  62. data/lib/notifo/api/users_api.rb +667 -0
  63. data/lib/notifo/api_client.rb +389 -0
  64. data/lib/notifo/api_error.rb +57 -0
  65. data/lib/notifo/configuration.rb +268 -0
  66. data/lib/notifo/models/add_allowed_topic_request.rb +219 -0
  67. data/lib/notifo/models/add_contributor_dto.rb +229 -0
  68. data/lib/notifo/models/app_contributor_dto.rb +239 -0
  69. data/lib/notifo/models/app_details_dto.rb +381 -0
  70. data/lib/notifo/models/app_dto.rb +273 -0
  71. data/lib/notifo/models/confirm_mode.rb +38 -0
  72. data/lib/notifo/models/create_email_template_dto.rb +219 -0
  73. data/lib/notifo/models/email_template_dto.rb +240 -0
  74. data/lib/notifo/models/email_verification_status.rb +39 -0
  75. data/lib/notifo/models/error_dto.rb +265 -0
  76. data/lib/notifo/models/event_dto.rb +333 -0
  77. data/lib/notifo/models/inline_object.rb +219 -0
  78. data/lib/notifo/models/iso_day_of_week.rb +43 -0
  79. data/lib/notifo/models/list_response_dto_of_event_dto.rb +231 -0
  80. data/lib/notifo/models/list_response_dto_of_log_entry_dto.rb +231 -0
  81. data/lib/notifo/models/list_response_dto_of_media_dto.rb +231 -0
  82. data/lib/notifo/models/list_response_dto_of_subscription_dto.rb +231 -0
  83. data/lib/notifo/models/list_response_dto_of_template_dto.rb +231 -0
  84. data/lib/notifo/models/list_response_dto_of_topic_dto.rb +231 -0
  85. data/lib/notifo/models/list_response_dto_of_user_dto.rb +231 -0
  86. data/lib/notifo/models/log_entry_dto.rb +249 -0
  87. data/lib/notifo/models/media_dto.rb +269 -0
  88. data/lib/notifo/models/media_type.rb +39 -0
  89. data/lib/notifo/models/notification_formatting_dto.rb +295 -0
  90. data/lib/notifo/models/notification_setting_dto.rb +231 -0
  91. data/lib/notifo/models/publish_many_request_dto.rb +221 -0
  92. data/lib/notifo/models/publish_request_dto.rb +315 -0
  93. data/lib/notifo/models/resize_mode.rb +42 -0
  94. data/lib/notifo/models/scheduling_dto.rb +251 -0
  95. data/lib/notifo/models/scheduling_type.rb +37 -0
  96. data/lib/notifo/models/subscribe_dto.rb +229 -0
  97. data/lib/notifo/models/subscription_dto.rb +229 -0
  98. data/lib/notifo/models/template_dto.rb +239 -0
  99. data/lib/notifo/models/topic_dto.rb +239 -0
  100. data/lib/notifo/models/upsert_app_dto.rb +321 -0
  101. data/lib/notifo/models/upsert_template_dto.rb +240 -0
  102. data/lib/notifo/models/upsert_templates_dto.rb +221 -0
  103. data/lib/notifo/models/upsert_user_dto.rb +297 -0
  104. data/lib/notifo/models/upsert_users_dto.rb +221 -0
  105. data/lib/notifo/models/user_dto.rb +309 -0
  106. data/lib/notifo/version.rb +15 -0
  107. data/notifo-io-1.0.0.gem +0 -0
  108. data/notifo-io-1.0.0.pre.beta.gem +0 -0
  109. data/notifo.gemspec +38 -0
  110. data/spec/api/apps_api_spec.rb +151 -0
  111. data/spec/api/configs_api_spec.rb +55 -0
  112. data/spec/api/events_api_spec.rb +61 -0
  113. data/spec/api/logs_api_spec.rb +49 -0
  114. data/spec/api/media_api_spec.rb +95 -0
  115. data/spec/api/templates_api_spec.rb +73 -0
  116. data/spec/api/topics_api_spec.rb +85 -0
  117. data/spec/api/users_api_spec.rb +152 -0
  118. data/spec/api_client_spec.rb +226 -0
  119. data/spec/configuration_spec.rb +42 -0
  120. data/spec/models/add_allowed_topic_request_spec.rb +34 -0
  121. data/spec/models/add_contributor_dto_spec.rb +40 -0
  122. data/spec/models/app_contributor_dto_spec.rb +46 -0
  123. data/spec/models/app_details_dto_spec.rb +124 -0
  124. data/spec/models/app_dto_spec.rb +64 -0
  125. data/spec/models/confirm_mode_spec.rb +28 -0
  126. data/spec/models/create_email_template_dto_spec.rb +34 -0
  127. data/spec/models/email_template_dto_spec.rb +46 -0
  128. data/spec/models/email_verification_status_spec.rb +28 -0
  129. data/spec/models/error_dto_spec.rb +58 -0
  130. data/spec/models/event_dto_spec.rb +100 -0
  131. data/spec/models/inline_object_spec.rb +34 -0
  132. data/spec/models/iso_day_of_week_spec.rb +28 -0
  133. data/spec/models/list_response_dto_of_event_dto_spec.rb +40 -0
  134. data/spec/models/list_response_dto_of_log_entry_dto_spec.rb +40 -0
  135. data/spec/models/list_response_dto_of_media_dto_spec.rb +40 -0
  136. data/spec/models/list_response_dto_of_subscription_dto_spec.rb +40 -0
  137. data/spec/models/list_response_dto_of_template_dto_spec.rb +40 -0
  138. data/spec/models/list_response_dto_of_topic_dto_spec.rb +40 -0
  139. data/spec/models/list_response_dto_of_user_dto_spec.rb +40 -0
  140. data/spec/models/log_entry_dto_spec.rb +52 -0
  141. data/spec/models/media_dto_spec.rb +64 -0
  142. data/spec/models/media_type_spec.rb +28 -0
  143. data/spec/models/notification_formatting_dto_spec.rb +76 -0
  144. data/spec/models/notification_setting_dto_spec.rb +40 -0
  145. data/spec/models/publish_many_request_dto_spec.rb +34 -0
  146. data/spec/models/publish_request_dto_spec.rb +88 -0
  147. data/spec/models/resize_mode_spec.rb +28 -0
  148. data/spec/models/scheduling_dto_spec.rb +52 -0
  149. data/spec/models/scheduling_type_spec.rb +28 -0
  150. data/spec/models/subscribe_dto_spec.rb +40 -0
  151. data/spec/models/subscription_dto_spec.rb +40 -0
  152. data/spec/models/template_dto_spec.rb +46 -0
  153. data/spec/models/topic_dto_spec.rb +46 -0
  154. data/spec/models/upsert_app_dto_spec.rb +88 -0
  155. data/spec/models/upsert_template_dto_spec.rb +46 -0
  156. data/spec/models/upsert_templates_dto_spec.rb +34 -0
  157. data/spec/models/upsert_user_dto_spec.rb +76 -0
  158. data/spec/models/upsert_users_dto_spec.rb +34 -0
  159. data/spec/models/user_dto_spec.rb +88 -0
  160. data/spec/spec_helper.rb +111 -0
  161. metadata +294 -0
@@ -0,0 +1,132 @@
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 ConfigsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get all supported languages.
23
+ # @param [Hash] opts the optional parameters
24
+ # @return [Array<String>]
25
+ def configs_get_languages(opts = {})
26
+ data, _status_code, _headers = configs_get_languages_with_http_info(opts)
27
+ data
28
+ end
29
+
30
+ # Get all supported languages.
31
+ # @param [Hash] opts the optional parameters
32
+ # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
33
+ def configs_get_languages_with_http_info(opts = {})
34
+ if @api_client.config.debugging
35
+ @api_client.config.logger.debug 'Calling API: ConfigsApi.configs_get_languages ...'
36
+ end
37
+ # resource path
38
+ local_var_path = '/api/languages'
39
+
40
+ # query parameters
41
+ query_params = opts[:query_params] || {}
42
+
43
+ # header parameters
44
+ header_params = opts[:header_params] || {}
45
+ # HTTP header 'Accept' (if needed)
46
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
47
+
48
+ # form parameters
49
+ form_params = opts[:form_params] || {}
50
+
51
+ # http body (model)
52
+ post_body = opts[:debug_body]
53
+
54
+ # return_type
55
+ return_type = opts[:debug_return_type] || 'Array<String>'
56
+
57
+ # auth_names
58
+ auth_names = opts[:debug_auth_names] || []
59
+
60
+ new_options = opts.merge(
61
+ :operation => :"ConfigsApi.configs_get_languages",
62
+ :header_params => header_params,
63
+ :query_params => query_params,
64
+ :form_params => form_params,
65
+ :body => post_body,
66
+ :auth_names => auth_names,
67
+ :return_type => return_type
68
+ )
69
+
70
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
71
+ if @api_client.config.debugging
72
+ @api_client.config.logger.debug "API called: ConfigsApi#configs_get_languages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
73
+ end
74
+ return data, status_code, headers
75
+ end
76
+
77
+ # Get all supported timezones.
78
+ # @param [Hash] opts the optional parameters
79
+ # @return [Array<String>]
80
+ def configs_get_timezones(opts = {})
81
+ data, _status_code, _headers = configs_get_timezones_with_http_info(opts)
82
+ data
83
+ end
84
+
85
+ # Get all supported timezones.
86
+ # @param [Hash] opts the optional parameters
87
+ # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
88
+ def configs_get_timezones_with_http_info(opts = {})
89
+ if @api_client.config.debugging
90
+ @api_client.config.logger.debug 'Calling API: ConfigsApi.configs_get_timezones ...'
91
+ end
92
+ # resource path
93
+ local_var_path = '/api/timezones'
94
+
95
+ # query parameters
96
+ query_params = opts[:query_params] || {}
97
+
98
+ # header parameters
99
+ header_params = opts[:header_params] || {}
100
+ # HTTP header 'Accept' (if needed)
101
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
102
+
103
+ # form parameters
104
+ form_params = opts[:form_params] || {}
105
+
106
+ # http body (model)
107
+ post_body = opts[:debug_body]
108
+
109
+ # return_type
110
+ return_type = opts[:debug_return_type] || 'Array<String>'
111
+
112
+ # auth_names
113
+ auth_names = opts[:debug_auth_names] || []
114
+
115
+ new_options = opts.merge(
116
+ :operation => :"ConfigsApi.configs_get_timezones",
117
+ :header_params => header_params,
118
+ :query_params => query_params,
119
+ :form_params => form_params,
120
+ :body => post_body,
121
+ :auth_names => auth_names,
122
+ :return_type => return_type
123
+ )
124
+
125
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
126
+ if @api_client.config.debugging
127
+ @api_client.config.logger.debug "API called: ConfigsApi#configs_get_timezones\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
128
+ end
129
+ return data, status_code, headers
130
+ end
131
+ end
132
+ end
@@ -0,0 +1,161 @@
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 EventsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Query events.
23
+ # @param app_id [String] The app where the events 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 [ListResponseDtoOfEventDto]
29
+ def events_get_events(app_id, opts = {})
30
+ data, _status_code, _headers = events_get_events_with_http_info(app_id, opts)
31
+ data
32
+ end
33
+
34
+ # Query events.
35
+ # @param app_id [String] The app where the events 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<(ListResponseDtoOfEventDto, Integer, Hash)>] ListResponseDtoOfEventDto data, response status code and response headers
41
+ def events_get_events_with_http_info(app_id, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: EventsApi.events_get_events ...'
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 EventsApi.events_get_events"
48
+ end
49
+ # resource path
50
+ local_var_path = '/api/apps/{appId}/events'.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] || 'ListResponseDtoOfEventDto'
71
+
72
+ # auth_names
73
+ auth_names = opts[:debug_auth_names] || []
74
+
75
+ new_options = opts.merge(
76
+ :operation => :"EventsApi.events_get_events",
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: EventsApi#events_get_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
92
+ # Publish events.
93
+ # @param app_id [String] The app where the events belongs to.
94
+ # @param publish_many_request_dto [PublishManyRequestDto] The publish request.
95
+ # @param [Hash] opts the optional parameters
96
+ # @return [nil]
97
+ def events_post_events(app_id, publish_many_request_dto, opts = {})
98
+ events_post_events_with_http_info(app_id, publish_many_request_dto, opts)
99
+ nil
100
+ end
101
+
102
+ # Publish events.
103
+ # @param app_id [String] The app where the events belongs to.
104
+ # @param publish_many_request_dto [PublishManyRequestDto] The publish request.
105
+ # @param [Hash] opts the optional parameters
106
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
107
+ def events_post_events_with_http_info(app_id, publish_many_request_dto, opts = {})
108
+ if @api_client.config.debugging
109
+ @api_client.config.logger.debug 'Calling API: EventsApi.events_post_events ...'
110
+ end
111
+ # verify the required parameter 'app_id' is set
112
+ if @api_client.config.client_side_validation && app_id.nil?
113
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EventsApi.events_post_events"
114
+ end
115
+ # verify the required parameter 'publish_many_request_dto' is set
116
+ if @api_client.config.client_side_validation && publish_many_request_dto.nil?
117
+ fail ArgumentError, "Missing the required parameter 'publish_many_request_dto' when calling EventsApi.events_post_events"
118
+ end
119
+ # resource path
120
+ local_var_path = '/api/apps/{appId}/events'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
121
+
122
+ # query parameters
123
+ query_params = opts[:query_params] || {}
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
+ # HTTP header 'Content-Type'
130
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
131
+
132
+ # form parameters
133
+ form_params = opts[:form_params] || {}
134
+
135
+ # http body (model)
136
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(publish_many_request_dto)
137
+
138
+ # return_type
139
+ return_type = opts[:debug_return_type]
140
+
141
+ # auth_names
142
+ auth_names = opts[:debug_auth_names] || []
143
+
144
+ new_options = opts.merge(
145
+ :operation => :"EventsApi.events_post_events",
146
+ :header_params => header_params,
147
+ :query_params => query_params,
148
+ :form_params => form_params,
149
+ :body => post_body,
150
+ :auth_names => auth_names,
151
+ :return_type => return_type
152
+ )
153
+
154
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
155
+ if @api_client.config.debugging
156
+ @api_client.config.logger.debug "API called: EventsApi#events_post_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
157
+ end
158
+ return data, status_code, headers
159
+ end
160
+ end
161
+ 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.0.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Notifo
16
+ class LogsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Query log entries.
23
+ # @param app_id [String] The app where the log entries 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 [ListResponseDtoOfLogEntryDto]
29
+ def logs_get_logs(app_id, opts = {})
30
+ data, _status_code, _headers = logs_get_logs_with_http_info(app_id, opts)
31
+ data
32
+ end
33
+
34
+ # Query log entries.
35
+ # @param app_id [String] The app where the log entries 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<(ListResponseDtoOfLogEntryDto, Integer, Hash)>] ListResponseDtoOfLogEntryDto data, response status code and response headers
41
+ def logs_get_logs_with_http_info(app_id, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: LogsApi.logs_get_logs ...'
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 LogsApi.logs_get_logs"
48
+ end
49
+ # resource path
50
+ local_var_path = '/api/apps/{appId}/logs'.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] || 'ListResponseDtoOfLogEntryDto'
71
+
72
+ # auth_names
73
+ auth_names = opts[:debug_auth_names] || []
74
+
75
+ new_options = opts.merge(
76
+ :operation => :"LogsApi.logs_get_logs",
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: LogsApi#logs_get_logs\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,322 @@
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 MediaApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete a media.
23
+ # @param app_id [String] The app id where the media belongs to.
24
+ # @param file_name [String] The file name of the media.
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [nil]
27
+ def media_delete(app_id, file_name, opts = {})
28
+ media_delete_with_http_info(app_id, file_name, opts)
29
+ nil
30
+ end
31
+
32
+ # Delete a media.
33
+ # @param app_id [String] The app id where the media belongs to.
34
+ # @param file_name [String] The file name of the media.
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
37
+ def media_delete_with_http_info(app_id, file_name, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: MediaApi.media_delete ...'
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 MediaApi.media_delete"
44
+ end
45
+ # verify the required parameter 'file_name' is set
46
+ if @api_client.config.client_side_validation && file_name.nil?
47
+ fail ArgumentError, "Missing the required parameter 'file_name' when calling MediaApi.media_delete"
48
+ end
49
+ # resource path
50
+ local_var_path = '/api/apps/{appId}/media/{fileName}'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s)).sub('{' + 'fileName' + '}', CGI.escape(file_name.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]
68
+
69
+ # auth_names
70
+ auth_names = opts[:debug_auth_names] || []
71
+
72
+ new_options = opts.merge(
73
+ :operation => :"MediaApi.media_delete",
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: MediaApi#media_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+
89
+ # Download a media object.
90
+ # @param app_id [String] The app id where the media belongs to.
91
+ # @param file_name [String] The name of the media to download.
92
+ # @param [Hash] opts the optional parameters
93
+ # @option opts [Integer] :cache The cache duration.
94
+ # @option opts [Integer] :download Set it to 1 to create a download response.
95
+ # @option opts [Integer] :width The target width when an image.
96
+ # @option opts [Integer] :height The target height when an image.
97
+ # @option opts [Integer] :quality The target quality when an image.
98
+ # @option opts [String] :preset A preset dimension.
99
+ # @option opts [OneOfResizeMode] :mode The resize mode.
100
+ # @option opts [Float] :focus_x The x position of the focues point.
101
+ # @option opts [Float] :focus_y The y position of the focues point.
102
+ # @option opts [Boolean] :force True to resize it and clear the cache.
103
+ # @return [File]
104
+ def media_download(app_id, file_name, opts = {})
105
+ data, _status_code, _headers = media_download_with_http_info(app_id, file_name, opts)
106
+ data
107
+ end
108
+
109
+ # Download a media object.
110
+ # @param app_id [String] The app id where the media belongs to.
111
+ # @param file_name [String] The name of the media to download.
112
+ # @param [Hash] opts the optional parameters
113
+ # @option opts [Integer] :cache The cache duration.
114
+ # @option opts [Integer] :download Set it to 1 to create a download response.
115
+ # @option opts [Integer] :width The target width when an image.
116
+ # @option opts [Integer] :height The target height when an image.
117
+ # @option opts [Integer] :quality The target quality when an image.
118
+ # @option opts [String] :preset A preset dimension.
119
+ # @option opts [OneOfResizeMode] :mode The resize mode.
120
+ # @option opts [Float] :focus_x The x position of the focues point.
121
+ # @option opts [Float] :focus_y The y position of the focues point.
122
+ # @option opts [Boolean] :force True to resize it and clear the cache.
123
+ # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
124
+ def media_download_with_http_info(app_id, file_name, opts = {})
125
+ if @api_client.config.debugging
126
+ @api_client.config.logger.debug 'Calling API: MediaApi.media_download ...'
127
+ end
128
+ # verify the required parameter 'app_id' is set
129
+ if @api_client.config.client_side_validation && app_id.nil?
130
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling MediaApi.media_download"
131
+ end
132
+ # verify the required parameter 'file_name' is set
133
+ if @api_client.config.client_side_validation && file_name.nil?
134
+ fail ArgumentError, "Missing the required parameter 'file_name' when calling MediaApi.media_download"
135
+ end
136
+ # resource path
137
+ local_var_path = '/api/assets/{appId}/{fileName}'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s)).sub('{' + 'fileName' + '}', CGI.escape(file_name.to_s))
138
+
139
+ # query parameters
140
+ query_params = opts[:query_params] || {}
141
+ query_params[:'cache'] = opts[:'cache'] if !opts[:'cache'].nil?
142
+ query_params[:'download'] = opts[:'download'] if !opts[:'download'].nil?
143
+ query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
144
+ query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
145
+ query_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil?
146
+ query_params[:'preset'] = opts[:'preset'] if !opts[:'preset'].nil?
147
+ query_params[:'mode'] = opts[:'mode'] if !opts[:'mode'].nil?
148
+ query_params[:'focusX'] = opts[:'focus_x'] if !opts[:'focus_x'].nil?
149
+ query_params[:'focusY'] = opts[:'focus_y'] if !opts[:'focus_y'].nil?
150
+ query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
151
+
152
+ # header parameters
153
+ header_params = opts[:header_params] || {}
154
+ # HTTP header 'Accept' (if needed)
155
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', 'application/json'])
156
+
157
+ # form parameters
158
+ form_params = opts[:form_params] || {}
159
+
160
+ # http body (model)
161
+ post_body = opts[:debug_body]
162
+
163
+ # return_type
164
+ return_type = opts[:debug_return_type] || 'File'
165
+
166
+ # auth_names
167
+ auth_names = opts[:debug_auth_names] || []
168
+
169
+ new_options = opts.merge(
170
+ :operation => :"MediaApi.media_download",
171
+ :header_params => header_params,
172
+ :query_params => query_params,
173
+ :form_params => form_params,
174
+ :body => post_body,
175
+ :auth_names => auth_names,
176
+ :return_type => return_type
177
+ )
178
+
179
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
180
+ if @api_client.config.debugging
181
+ @api_client.config.logger.debug "API called: MediaApi#media_download\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
182
+ end
183
+ return data, status_code, headers
184
+ end
185
+
186
+ # Query media items.
187
+ # @param app_id [String] The app where the media belongs to.
188
+ # @param [Hash] opts the optional parameters
189
+ # @option opts [String] :query The optional query to search for items.
190
+ # @option opts [Integer] :take The number of items to return.
191
+ # @option opts [Integer] :skip The number of items to skip.
192
+ # @return [ListResponseDtoOfMediaDto]
193
+ def media_get_medias(app_id, opts = {})
194
+ data, _status_code, _headers = media_get_medias_with_http_info(app_id, opts)
195
+ data
196
+ end
197
+
198
+ # Query media items.
199
+ # @param app_id [String] The app where the media belongs to.
200
+ # @param [Hash] opts the optional parameters
201
+ # @option opts [String] :query The optional query to search for items.
202
+ # @option opts [Integer] :take The number of items to return.
203
+ # @option opts [Integer] :skip The number of items to skip.
204
+ # @return [Array<(ListResponseDtoOfMediaDto, Integer, Hash)>] ListResponseDtoOfMediaDto data, response status code and response headers
205
+ def media_get_medias_with_http_info(app_id, opts = {})
206
+ if @api_client.config.debugging
207
+ @api_client.config.logger.debug 'Calling API: MediaApi.media_get_medias ...'
208
+ end
209
+ # verify the required parameter 'app_id' is set
210
+ if @api_client.config.client_side_validation && app_id.nil?
211
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling MediaApi.media_get_medias"
212
+ end
213
+ # resource path
214
+ local_var_path = '/api/apps/{appId}/media'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
215
+
216
+ # query parameters
217
+ query_params = opts[:query_params] || {}
218
+ query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
219
+ query_params[:'take'] = opts[:'take'] if !opts[:'take'].nil?
220
+ query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
221
+
222
+ # header parameters
223
+ header_params = opts[:header_params] || {}
224
+ # HTTP header 'Accept' (if needed)
225
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
226
+
227
+ # form parameters
228
+ form_params = opts[:form_params] || {}
229
+
230
+ # http body (model)
231
+ post_body = opts[:debug_body]
232
+
233
+ # return_type
234
+ return_type = opts[:debug_return_type] || 'ListResponseDtoOfMediaDto'
235
+
236
+ # auth_names
237
+ auth_names = opts[:debug_auth_names] || []
238
+
239
+ new_options = opts.merge(
240
+ :operation => :"MediaApi.media_get_medias",
241
+ :header_params => header_params,
242
+ :query_params => query_params,
243
+ :form_params => form_params,
244
+ :body => post_body,
245
+ :auth_names => auth_names,
246
+ :return_type => return_type
247
+ )
248
+
249
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
250
+ if @api_client.config.debugging
251
+ @api_client.config.logger.debug "API called: MediaApi#media_get_medias\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
252
+ end
253
+ return data, status_code, headers
254
+ end
255
+
256
+ # Upload a media object.
257
+ # @param app_id [String] The app id where the media belongs to.
258
+ # @param [Hash] opts the optional parameters
259
+ # @option opts [File] :file
260
+ # @return [nil]
261
+ def media_upload(app_id, opts = {})
262
+ media_upload_with_http_info(app_id, opts)
263
+ nil
264
+ end
265
+
266
+ # Upload a media object.
267
+ # @param app_id [String] The app id where the media belongs to.
268
+ # @param [Hash] opts the optional parameters
269
+ # @option opts [File] :file
270
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
271
+ def media_upload_with_http_info(app_id, opts = {})
272
+ if @api_client.config.debugging
273
+ @api_client.config.logger.debug 'Calling API: MediaApi.media_upload ...'
274
+ end
275
+ # verify the required parameter 'app_id' is set
276
+ if @api_client.config.client_side_validation && app_id.nil?
277
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling MediaApi.media_upload"
278
+ end
279
+ # resource path
280
+ local_var_path = '/api/apps/{appId}/media'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
281
+
282
+ # query parameters
283
+ query_params = opts[:query_params] || {}
284
+
285
+ # header parameters
286
+ header_params = opts[:header_params] || {}
287
+ # HTTP header 'Accept' (if needed)
288
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
289
+ # HTTP header 'Content-Type'
290
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
291
+
292
+ # form parameters
293
+ form_params = opts[:form_params] || {}
294
+ form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
295
+
296
+ # http body (model)
297
+ post_body = opts[:debug_body]
298
+
299
+ # return_type
300
+ return_type = opts[:debug_return_type]
301
+
302
+ # auth_names
303
+ auth_names = opts[:debug_auth_names] || []
304
+
305
+ new_options = opts.merge(
306
+ :operation => :"MediaApi.media_upload",
307
+ :header_params => header_params,
308
+ :query_params => query_params,
309
+ :form_params => form_params,
310
+ :body => post_body,
311
+ :auth_names => auth_names,
312
+ :return_type => return_type
313
+ )
314
+
315
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
316
+ if @api_client.config.debugging
317
+ @api_client.config.logger.debug "API called: MediaApi#media_upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
318
+ end
319
+ return data, status_code, headers
320
+ end
321
+ end
322
+ end