notifo-io-easierlife 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +167 -0
  4. data/Rakefile +10 -0
  5. data/docs/AddAllowedTopicDto.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/IsoDayOfWeek.md +15 -0
  20. data/docs/ListResponseDtoOfEventDto.md +20 -0
  21. data/docs/ListResponseDtoOfLogEntryDto.md +20 -0
  22. data/docs/ListResponseDtoOfMediaDto.md +20 -0
  23. data/docs/ListResponseDtoOfSubscriptionDto.md +20 -0
  24. data/docs/ListResponseDtoOfTemplateDto.md +20 -0
  25. data/docs/ListResponseDtoOfTopicDto.md +20 -0
  26. data/docs/ListResponseDtoOfUserDto.md +20 -0
  27. data/docs/LogEntryDto.md +24 -0
  28. data/docs/LogsApi.md +78 -0
  29. data/docs/MediaApi.md +382 -0
  30. data/docs/MediaDto.md +30 -0
  31. data/docs/MediaType.md +15 -0
  32. data/docs/NotificationFormattingDto.md +32 -0
  33. data/docs/NotificationSend.md +15 -0
  34. data/docs/NotificationSettingDto.md +20 -0
  35. data/docs/ProfileDto.md +32 -0
  36. data/docs/PublishDto.md +36 -0
  37. data/docs/PublishManyDto.md +18 -0
  38. data/docs/ResizeMode.md +15 -0
  39. data/docs/SchedulingDto.md +24 -0
  40. data/docs/SchedulingType.md +15 -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 +78 -0
  46. data/docs/UpdateProfileDto.md +28 -0
  47. data/docs/UpsertAppDto.md +36 -0
  48. data/docs/UpsertTemplateDto.md +22 -0
  49. data/docs/UpsertTemplatesDto.md +18 -0
  50. data/docs/UpsertUserDto.md +32 -0
  51. data/docs/UpsertUsersDto.md +18 -0
  52. data/docs/UserApi.md +323 -0
  53. data/docs/UserDto.md +36 -0
  54. data/docs/UsersApi.md +610 -0
  55. data/git_push.sh +58 -0
  56. data/lib/notifo.rb +89 -0
  57. data/lib/notifo/api/apps_api.rb +678 -0
  58. data/lib/notifo/api/configs_api.rb +132 -0
  59. data/lib/notifo/api/events_api.rb +161 -0
  60. data/lib/notifo/api/logs_api.rb +92 -0
  61. data/lib/notifo/api/media_api.rb +419 -0
  62. data/lib/notifo/api/templates_api.rb +228 -0
  63. data/lib/notifo/api/topics_api.rb +92 -0
  64. data/lib/notifo/api/user_api.rb +331 -0
  65. data/lib/notifo/api/users_api.rb +667 -0
  66. data/lib/notifo/api_client.rb +389 -0
  67. data/lib/notifo/api_error.rb +57 -0
  68. data/lib/notifo/configuration.rb +270 -0
  69. data/lib/notifo/models/add_allowed_topic_dto.rb +243 -0
  70. data/lib/notifo/models/add_contributor_dto.rb +277 -0
  71. data/lib/notifo/models/app_contributor_dto.rb +311 -0
  72. data/lib/notifo/models/app_details_dto.rb +489 -0
  73. data/lib/notifo/models/app_dto.rb +362 -0
  74. data/lib/notifo/models/confirm_mode.rb +38 -0
  75. data/lib/notifo/models/create_email_template_dto.rb +243 -0
  76. data/lib/notifo/models/email_template_dto.rb +288 -0
  77. data/lib/notifo/models/email_verification_status.rb +39 -0
  78. data/lib/notifo/models/error_dto.rb +265 -0
  79. data/lib/notifo/models/event_dto.rb +456 -0
  80. data/lib/notifo/models/iso_day_of_week.rb +43 -0
  81. data/lib/notifo/models/list_response_dto_of_event_dto.rb +241 -0
  82. data/lib/notifo/models/list_response_dto_of_log_entry_dto.rb +241 -0
  83. data/lib/notifo/models/list_response_dto_of_media_dto.rb +241 -0
  84. data/lib/notifo/models/list_response_dto_of_subscription_dto.rb +241 -0
  85. data/lib/notifo/models/list_response_dto_of_template_dto.rb +241 -0
  86. data/lib/notifo/models/list_response_dto_of_topic_dto.rb +241 -0
  87. data/lib/notifo/models/list_response_dto_of_user_dto.rb +241 -0
  88. data/lib/notifo/models/log_entry_dto.rb +326 -0
  89. data/lib/notifo/models/media_dto.rb +390 -0
  90. data/lib/notifo/models/media_type.rb +39 -0
  91. data/lib/notifo/models/notification_formatting_dto.rb +305 -0
  92. data/lib/notifo/models/notification_send.rb +39 -0
  93. data/lib/notifo/models/notification_setting_dto.rb +234 -0
  94. data/lib/notifo/models/profile_dto.rb +361 -0
  95. data/lib/notifo/models/publish_dto.rb +338 -0
  96. data/lib/notifo/models/publish_many_dto.rb +226 -0
  97. data/lib/notifo/models/resize_mode.rb +42 -0
  98. data/lib/notifo/models/scheduling_dto.rb +248 -0
  99. data/lib/notifo/models/scheduling_type.rb +37 -0
  100. data/lib/notifo/models/subscription_dto.rb +256 -0
  101. data/lib/notifo/models/template_dto.rb +274 -0
  102. data/lib/notifo/models/topic_dto.rb +294 -0
  103. data/lib/notifo/models/update_profile_dto.rb +277 -0
  104. data/lib/notifo/models/upsert_app_dto.rb +321 -0
  105. data/lib/notifo/models/upsert_template_dto.rb +270 -0
  106. data/lib/notifo/models/upsert_templates_dto.rb +226 -0
  107. data/lib/notifo/models/upsert_user_dto.rb +299 -0
  108. data/lib/notifo/models/upsert_users_dto.rb +226 -0
  109. data/lib/notifo/models/user_dto.rb +381 -0
  110. data/lib/notifo/version.rb +15 -0
  111. data/notifo-io-1.0.0.gem +0 -0
  112. data/notifo.gemspec +38 -0
  113. data/spec/api/apps_api_spec.rb +151 -0
  114. data/spec/api/configs_api_spec.rb +55 -0
  115. data/spec/api/events_api_spec.rb +61 -0
  116. data/spec/api/logs_api_spec.rb +49 -0
  117. data/spec/api/media_api_spec.rb +117 -0
  118. data/spec/api/templates_api_spec.rb +73 -0
  119. data/spec/api/topics_api_spec.rb +49 -0
  120. data/spec/api/user_api_spec.rb +92 -0
  121. data/spec/api/users_api_spec.rb +152 -0
  122. data/spec/api_client_spec.rb +226 -0
  123. data/spec/configuration_spec.rb +42 -0
  124. data/spec/models/add_allowed_topic_dto_spec.rb +34 -0
  125. data/spec/models/add_contributor_dto_spec.rb +40 -0
  126. data/spec/models/app_contributor_dto_spec.rb +46 -0
  127. data/spec/models/app_details_dto_spec.rb +124 -0
  128. data/spec/models/app_dto_spec.rb +64 -0
  129. data/spec/models/confirm_mode_spec.rb +28 -0
  130. data/spec/models/create_email_template_dto_spec.rb +34 -0
  131. data/spec/models/email_template_dto_spec.rb +46 -0
  132. data/spec/models/email_verification_status_spec.rb +28 -0
  133. data/spec/models/error_dto_spec.rb +58 -0
  134. data/spec/models/event_dto_spec.rb +100 -0
  135. data/spec/models/iso_day_of_week_spec.rb +28 -0
  136. data/spec/models/list_response_dto_of_event_dto_spec.rb +40 -0
  137. data/spec/models/list_response_dto_of_log_entry_dto_spec.rb +40 -0
  138. data/spec/models/list_response_dto_of_media_dto_spec.rb +40 -0
  139. data/spec/models/list_response_dto_of_subscription_dto_spec.rb +40 -0
  140. data/spec/models/list_response_dto_of_template_dto_spec.rb +40 -0
  141. data/spec/models/list_response_dto_of_topic_dto_spec.rb +40 -0
  142. data/spec/models/list_response_dto_of_user_dto_spec.rb +40 -0
  143. data/spec/models/log_entry_dto_spec.rb +52 -0
  144. data/spec/models/media_dto_spec.rb +70 -0
  145. data/spec/models/media_type_spec.rb +28 -0
  146. data/spec/models/notification_formatting_dto_spec.rb +76 -0
  147. data/spec/models/notification_send_spec.rb +28 -0
  148. data/spec/models/notification_setting_dto_spec.rb +40 -0
  149. data/spec/models/profile_dto_spec.rb +76 -0
  150. data/spec/models/publish_dto_spec.rb +88 -0
  151. data/spec/models/publish_many_dto_spec.rb +34 -0
  152. data/spec/models/resize_mode_spec.rb +28 -0
  153. data/spec/models/scheduling_dto_spec.rb +52 -0
  154. data/spec/models/scheduling_type_spec.rb +28 -0
  155. data/spec/models/subscription_dto_spec.rb +40 -0
  156. data/spec/models/template_dto_spec.rb +46 -0
  157. data/spec/models/topic_dto_spec.rb +46 -0
  158. data/spec/models/update_profile_dto_spec.rb +64 -0
  159. data/spec/models/upsert_app_dto_spec.rb +88 -0
  160. data/spec/models/upsert_template_dto_spec.rb +46 -0
  161. data/spec/models/upsert_templates_dto_spec.rb +34 -0
  162. data/spec/models/upsert_user_dto_spec.rb +76 -0
  163. data/spec/models/upsert_users_dto_spec.rb +34 -0
  164. data/spec/models/user_dto_spec.rb +88 -0
  165. data/spec/spec_helper.rb +111 -0
  166. metadata +301 -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.1.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.1.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_dto [PublishManyDto] The publish request.
95
+ # @param [Hash] opts the optional parameters
96
+ # @return [nil]
97
+ def events_post_events(app_id, publish_many_dto, opts = {})
98
+ events_post_events_with_http_info(app_id, publish_many_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_dto [PublishManyDto] 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_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_dto' is set
116
+ if @api_client.config.client_side_validation && publish_many_dto.nil?
117
+ fail ArgumentError, "Missing the required parameter 'publish_many_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_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.1.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,419 @@
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 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 [ResizeMode] :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 [ResizeMode] :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/apps/{appId}/media/{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
+ # Download a media object.
187
+ # @param app_id [String] The app id where the media belongs to.
188
+ # @param file_name [String] The name of the media to download.
189
+ # @param [Hash] opts the optional parameters
190
+ # @option opts [Integer] :cache The cache duration.
191
+ # @option opts [Integer] :download Set it to 1 to create a download response.
192
+ # @option opts [Integer] :width The target width when an image.
193
+ # @option opts [Integer] :height The target height when an image.
194
+ # @option opts [Integer] :quality The target quality when an image.
195
+ # @option opts [String] :preset A preset dimension.
196
+ # @option opts [ResizeMode] :mode The resize mode.
197
+ # @option opts [Float] :focus_x The x position of the focues point.
198
+ # @option opts [Float] :focus_y The y position of the focues point.
199
+ # @option opts [Boolean] :force True to resize it and clear the cache.
200
+ # @return [File]
201
+ def media_download2(app_id, file_name, opts = {})
202
+ data, _status_code, _headers = media_download2_with_http_info(app_id, file_name, opts)
203
+ data
204
+ end
205
+
206
+ # Download a media object.
207
+ # @param app_id [String] The app id where the media belongs to.
208
+ # @param file_name [String] The name of the media to download.
209
+ # @param [Hash] opts the optional parameters
210
+ # @option opts [Integer] :cache The cache duration.
211
+ # @option opts [Integer] :download Set it to 1 to create a download response.
212
+ # @option opts [Integer] :width The target width when an image.
213
+ # @option opts [Integer] :height The target height when an image.
214
+ # @option opts [Integer] :quality The target quality when an image.
215
+ # @option opts [String] :preset A preset dimension.
216
+ # @option opts [ResizeMode] :mode The resize mode.
217
+ # @option opts [Float] :focus_x The x position of the focues point.
218
+ # @option opts [Float] :focus_y The y position of the focues point.
219
+ # @option opts [Boolean] :force True to resize it and clear the cache.
220
+ # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
221
+ def media_download2_with_http_info(app_id, file_name, opts = {})
222
+ if @api_client.config.debugging
223
+ @api_client.config.logger.debug 'Calling API: MediaApi.media_download2 ...'
224
+ end
225
+ # verify the required parameter 'app_id' is set
226
+ if @api_client.config.client_side_validation && app_id.nil?
227
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling MediaApi.media_download2"
228
+ end
229
+ # verify the required parameter 'file_name' is set
230
+ if @api_client.config.client_side_validation && file_name.nil?
231
+ fail ArgumentError, "Missing the required parameter 'file_name' when calling MediaApi.media_download2"
232
+ end
233
+ # resource path
234
+ local_var_path = '/api/assets/{appId}/{fileName}'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s)).sub('{' + 'fileName' + '}', CGI.escape(file_name.to_s))
235
+
236
+ # query parameters
237
+ query_params = opts[:query_params] || {}
238
+ query_params[:'cache'] = opts[:'cache'] if !opts[:'cache'].nil?
239
+ query_params[:'download'] = opts[:'download'] if !opts[:'download'].nil?
240
+ query_params[:'width'] = opts[:'width'] if !opts[:'width'].nil?
241
+ query_params[:'height'] = opts[:'height'] if !opts[:'height'].nil?
242
+ query_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil?
243
+ query_params[:'preset'] = opts[:'preset'] if !opts[:'preset'].nil?
244
+ query_params[:'mode'] = opts[:'mode'] if !opts[:'mode'].nil?
245
+ query_params[:'focusX'] = opts[:'focus_x'] if !opts[:'focus_x'].nil?
246
+ query_params[:'focusY'] = opts[:'focus_y'] if !opts[:'focus_y'].nil?
247
+ query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
248
+
249
+ # header parameters
250
+ header_params = opts[:header_params] || {}
251
+ # HTTP header 'Accept' (if needed)
252
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream', 'application/json'])
253
+
254
+ # form parameters
255
+ form_params = opts[:form_params] || {}
256
+
257
+ # http body (model)
258
+ post_body = opts[:debug_body]
259
+
260
+ # return_type
261
+ return_type = opts[:debug_return_type] || 'File'
262
+
263
+ # auth_names
264
+ auth_names = opts[:debug_auth_names] || []
265
+
266
+ new_options = opts.merge(
267
+ :operation => :"MediaApi.media_download2",
268
+ :header_params => header_params,
269
+ :query_params => query_params,
270
+ :form_params => form_params,
271
+ :body => post_body,
272
+ :auth_names => auth_names,
273
+ :return_type => return_type
274
+ )
275
+
276
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
277
+ if @api_client.config.debugging
278
+ @api_client.config.logger.debug "API called: MediaApi#media_download2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
279
+ end
280
+ return data, status_code, headers
281
+ end
282
+
283
+ # Query media items.
284
+ # @param app_id [String] The app where the media belongs to.
285
+ # @param [Hash] opts the optional parameters
286
+ # @option opts [String] :query The optional query to search for items.
287
+ # @option opts [Integer] :take The number of items to return.
288
+ # @option opts [Integer] :skip The number of items to skip.
289
+ # @return [ListResponseDtoOfMediaDto]
290
+ def media_get_medias(app_id, opts = {})
291
+ data, _status_code, _headers = media_get_medias_with_http_info(app_id, opts)
292
+ data
293
+ end
294
+
295
+ # Query media items.
296
+ # @param app_id [String] The app where the media belongs to.
297
+ # @param [Hash] opts the optional parameters
298
+ # @option opts [String] :query The optional query to search for items.
299
+ # @option opts [Integer] :take The number of items to return.
300
+ # @option opts [Integer] :skip The number of items to skip.
301
+ # @return [Array<(ListResponseDtoOfMediaDto, Integer, Hash)>] ListResponseDtoOfMediaDto data, response status code and response headers
302
+ def media_get_medias_with_http_info(app_id, opts = {})
303
+ if @api_client.config.debugging
304
+ @api_client.config.logger.debug 'Calling API: MediaApi.media_get_medias ...'
305
+ end
306
+ # verify the required parameter 'app_id' is set
307
+ if @api_client.config.client_side_validation && app_id.nil?
308
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling MediaApi.media_get_medias"
309
+ end
310
+ # resource path
311
+ local_var_path = '/api/apps/{appId}/media'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
312
+
313
+ # query parameters
314
+ query_params = opts[:query_params] || {}
315
+ query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
316
+ query_params[:'take'] = opts[:'take'] if !opts[:'take'].nil?
317
+ query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
318
+
319
+ # header parameters
320
+ header_params = opts[:header_params] || {}
321
+ # HTTP header 'Accept' (if needed)
322
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
323
+
324
+ # form parameters
325
+ form_params = opts[:form_params] || {}
326
+
327
+ # http body (model)
328
+ post_body = opts[:debug_body]
329
+
330
+ # return_type
331
+ return_type = opts[:debug_return_type] || 'ListResponseDtoOfMediaDto'
332
+
333
+ # auth_names
334
+ auth_names = opts[:debug_auth_names] || []
335
+
336
+ new_options = opts.merge(
337
+ :operation => :"MediaApi.media_get_medias",
338
+ :header_params => header_params,
339
+ :query_params => query_params,
340
+ :form_params => form_params,
341
+ :body => post_body,
342
+ :auth_names => auth_names,
343
+ :return_type => return_type
344
+ )
345
+
346
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
347
+ if @api_client.config.debugging
348
+ @api_client.config.logger.debug "API called: MediaApi#media_get_medias\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
349
+ end
350
+ return data, status_code, headers
351
+ end
352
+
353
+ # Upload a media object.
354
+ # @param app_id [String] The app id where the media belongs to.
355
+ # @param [Hash] opts the optional parameters
356
+ # @option opts [File] :file
357
+ # @return [nil]
358
+ def media_upload(app_id, opts = {})
359
+ media_upload_with_http_info(app_id, opts)
360
+ nil
361
+ end
362
+
363
+ # Upload a media object.
364
+ # @param app_id [String] The app id where the media belongs to.
365
+ # @param [Hash] opts the optional parameters
366
+ # @option opts [File] :file
367
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
368
+ def media_upload_with_http_info(app_id, opts = {})
369
+ if @api_client.config.debugging
370
+ @api_client.config.logger.debug 'Calling API: MediaApi.media_upload ...'
371
+ end
372
+ # verify the required parameter 'app_id' is set
373
+ if @api_client.config.client_side_validation && app_id.nil?
374
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling MediaApi.media_upload"
375
+ end
376
+ # resource path
377
+ local_var_path = '/api/apps/{appId}/media'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
378
+
379
+ # query parameters
380
+ query_params = opts[:query_params] || {}
381
+
382
+ # header parameters
383
+ header_params = opts[:header_params] || {}
384
+ # HTTP header 'Accept' (if needed)
385
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
386
+ # HTTP header 'Content-Type'
387
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
388
+
389
+ # form parameters
390
+ form_params = opts[:form_params] || {}
391
+ form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
392
+
393
+ # http body (model)
394
+ post_body = opts[:debug_body]
395
+
396
+ # return_type
397
+ return_type = opts[:debug_return_type]
398
+
399
+ # auth_names
400
+ auth_names = opts[:debug_auth_names] || []
401
+
402
+ new_options = opts.merge(
403
+ :operation => :"MediaApi.media_upload",
404
+ :header_params => header_params,
405
+ :query_params => query_params,
406
+ :form_params => form_params,
407
+ :body => post_body,
408
+ :auth_names => auth_names,
409
+ :return_type => return_type
410
+ )
411
+
412
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
413
+ if @api_client.config.debugging
414
+ @api_client.config.logger.debug "API called: MediaApi#media_upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
415
+ end
416
+ return data, status_code, headers
417
+ end
418
+ end
419
+ end