notifo-io 1.0.1.1 → 1.0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +205 -4
  3. data/docs/AppDetailsDto.md +0 -8
  4. data/docs/AppIdMediaBody.md +7 -0
  5. data/docs/AppsApi.md +188 -2
  6. data/docs/AuthorizationApi.md +121 -0
  7. data/docs/ConfigsApi.md +1 -1
  8. data/docs/ConfiguredIntegrationDto.md +12 -0
  9. data/docs/ConfiguredIntegrationsDto.md +8 -0
  10. data/docs/CreateIntegrationDto.md +11 -0
  11. data/docs/EventDto.md +1 -0
  12. data/docs/EventsApi.md +45 -1
  13. data/docs/IntegrationCreatedDto.md +8 -0
  14. data/docs/IntegrationDefinitionDto.md +11 -0
  15. data/docs/IntegrationProperties.md +6 -0
  16. data/docs/IntegrationPropertyDto.md +17 -0
  17. data/docs/IntegrationPropertyType.md +6 -0
  18. data/docs/IntegrationStatus.md +6 -0
  19. data/docs/ListResponseDtoOfMobilePushTokenDto.md +8 -0
  20. data/docs/ListResponseDtoOfNotificationDto.md +8 -0
  21. data/docs/LogsApi.md +1 -1
  22. data/docs/MediaApi.md +1 -1
  23. data/docs/MobileDeviceType.md +6 -0
  24. data/docs/MobilePushApi.md +135 -0
  25. data/docs/MobilePushTokenDto.md +8 -0
  26. data/docs/NotificationDto.md +21 -0
  27. data/docs/NotificationsApi.md +141 -0
  28. data/docs/PublishDto.md +2 -0
  29. data/docs/RegisterMobileTokenDto.md +8 -0
  30. data/docs/TemplatesApi.md +1 -1
  31. data/docs/TopicsApi.md +1 -1
  32. data/docs/TrackNotificationDto.md +10 -0
  33. data/docs/UpdateIntegrationDto.md +10 -0
  34. data/docs/UpsertUserDto.md +1 -0
  35. data/docs/UserApi.md +1 -1
  36. data/docs/UserDto.md +3 -0
  37. data/docs/UserInfoApi.md +83 -0
  38. data/docs/UsersApi.md +1 -1
  39. data/lib/notifo.rb +23 -3
  40. data/lib/notifo/api/apps_api.rb +246 -2
  41. data/lib/notifo/api/authorization_api.rb +158 -0
  42. data/lib/notifo/api/configs_api.rb +1 -1
  43. data/lib/notifo/api/events_api.rb +57 -1
  44. data/lib/notifo/api/logs_api.rb +1 -1
  45. data/lib/notifo/api/media_api.rb +1 -1
  46. data/lib/notifo/api/mobile_push_api.rb +178 -0
  47. data/lib/notifo/api/notifications_api.rb +181 -0
  48. data/lib/notifo/api/templates_api.rb +1 -1
  49. data/lib/notifo/api/topics_api.rb +1 -1
  50. data/lib/notifo/api/user_api.rb +1 -1
  51. data/lib/notifo/api/user_info_api.rb +112 -0
  52. data/lib/notifo/api/users_api.rb +1 -1
  53. data/lib/notifo/api_client.rb +1 -1
  54. data/lib/notifo/api_error.rb +1 -1
  55. data/lib/notifo/configuration.rb +3 -3
  56. data/lib/notifo/models/add_allowed_topic_dto.rb +1 -1
  57. data/lib/notifo/models/add_contributor_dto.rb +1 -1
  58. data/lib/notifo/models/app_contributor_dto.rb +1 -1
  59. data/lib/notifo/models/app_details_dto.rb +3 -96
  60. data/lib/notifo/models/app_dto.rb +1 -1
  61. data/lib/notifo/models/app_id_media_body.rb +207 -0
  62. data/lib/notifo/models/configured_integration_dto.rb +271 -0
  63. data/lib/notifo/models/configured_integrations_dto.rb +231 -0
  64. data/lib/notifo/models/confirm_mode.rb +1 -1
  65. data/lib/notifo/models/create_email_template_dto.rb +1 -1
  66. data/lib/notifo/models/create_integration_dto.rb +257 -0
  67. data/lib/notifo/models/email_template_dto.rb +2 -1
  68. data/lib/notifo/models/email_templates_dto.rb +1 -1
  69. data/lib/notifo/models/error_dto.rb +5 -1
  70. data/lib/notifo/models/event_dto.rb +18 -5
  71. data/lib/notifo/models/event_properties.rb +1 -1
  72. data/lib/notifo/models/integration_created_dto.rb +226 -0
  73. data/lib/notifo/models/integration_definition_dto.rb +272 -0
  74. data/lib/notifo/models/integration_properties.rb +201 -0
  75. data/lib/notifo/models/integration_property_dto.rb +319 -0
  76. data/lib/notifo/models/integration_property_type.rb +31 -0
  77. data/lib/notifo/models/integration_status.rb +29 -0
  78. data/lib/notifo/models/iso_day_of_week.rb +1 -1
  79. data/lib/notifo/models/list_response_dto_of_event_dto.rb +1 -1
  80. data/lib/notifo/models/list_response_dto_of_log_entry_dto.rb +1 -1
  81. data/lib/notifo/models/list_response_dto_of_media_dto.rb +1 -1
  82. data/lib/notifo/models/list_response_dto_of_mobile_push_token_dto.rb +229 -0
  83. data/lib/notifo/models/list_response_dto_of_notification_dto.rb +229 -0
  84. data/lib/notifo/models/list_response_dto_of_subscription_dto.rb +1 -1
  85. data/lib/notifo/models/list_response_dto_of_template_dto.rb +1 -1
  86. data/lib/notifo/models/list_response_dto_of_topic_dto.rb +1 -1
  87. data/lib/notifo/models/list_response_dto_of_user_dto.rb +1 -1
  88. data/lib/notifo/models/localized_text.rb +1 -1
  89. data/lib/notifo/models/log_entry_dto.rb +1 -1
  90. data/lib/notifo/models/media_dto.rb +1 -1
  91. data/lib/notifo/models/media_metadata.rb +1 -1
  92. data/lib/notifo/models/media_type.rb +1 -1
  93. data/lib/notifo/models/mobile_device_type.rb +29 -0
  94. data/lib/notifo/models/mobile_push_token_dto.rb +221 -0
  95. data/lib/notifo/models/notification_dto.rb +386 -0
  96. data/lib/notifo/models/notification_formatting_dto.rb +1 -1
  97. data/lib/notifo/models/notification_send.rb +1 -1
  98. data/lib/notifo/models/notification_setting_dto.rb +2 -1
  99. data/lib/notifo/models/profile_dto.rb +4 -1
  100. data/lib/notifo/models/publish_dto.rb +30 -5
  101. data/lib/notifo/models/publish_many_dto.rb +1 -1
  102. data/lib/notifo/models/register_mobile_token_dto.rb +221 -0
  103. data/lib/notifo/models/resize_mode.rb +1 -1
  104. data/lib/notifo/models/scheduling_dto.rb +2 -1
  105. data/lib/notifo/models/scheduling_type.rb +1 -1
  106. data/lib/notifo/models/subscription_dto.rb +2 -1
  107. data/lib/notifo/models/template_dto.rb +1 -1
  108. data/lib/notifo/models/topic_dto.rb +1 -1
  109. data/lib/notifo/models/track_notification_dto.rb +243 -0
  110. data/lib/notifo/models/update_integration_dto.rb +242 -0
  111. data/lib/notifo/models/update_profile_dto.rb +7 -1
  112. data/lib/notifo/models/upsert_app_dto.rb +11 -1
  113. data/lib/notifo/models/upsert_template_dto.rb +2 -1
  114. data/lib/notifo/models/upsert_templates_dto.rb +1 -1
  115. data/lib/notifo/models/upsert_user_dto.rb +21 -2
  116. data/lib/notifo/models/upsert_users_dto.rb +1 -1
  117. data/lib/notifo/models/user_dto.rb +48 -2
  118. data/lib/notifo/version.rb +1 -1
  119. data/notifo-io-1.0.1.1.gem +0 -0
  120. data/notifo.gemspec +2 -2
  121. data/spec/api/authorization_api_spec.rb +61 -0
  122. data/spec/api/mobile_push_api_spec.rb +66 -0
  123. data/spec/api/notifications_api_spec.rb +68 -0
  124. data/spec/api/user_info_api_spec.rb +52 -0
  125. data/spec/models/app_id_media_body_spec.rb +40 -0
  126. data/spec/models/configured_integration_dto_spec.rb +70 -0
  127. data/spec/models/configured_integrations_dto_spec.rb +46 -0
  128. data/spec/models/create_integration_dto_spec.rb +64 -0
  129. data/spec/models/integration_created_dto_spec.rb +46 -0
  130. data/spec/models/integration_definition_dto_spec.rb +64 -0
  131. data/spec/models/integration_properties_spec.rb +34 -0
  132. data/spec/models/integration_property_dto_spec.rb +100 -0
  133. data/spec/models/integration_property_type_spec.rb +34 -0
  134. data/spec/models/integration_status_spec.rb +34 -0
  135. data/spec/models/list_response_dto_of_mobile_push_token_dto_spec.rb +46 -0
  136. data/spec/models/list_response_dto_of_notification_dto_spec.rb +46 -0
  137. data/spec/models/mobile_device_type_spec.rb +34 -0
  138. data/spec/models/mobile_push_token_dto_spec.rb +46 -0
  139. data/spec/models/notification_dto_spec.rb +124 -0
  140. data/spec/models/register_mobile_token_dto_spec.rb +46 -0
  141. data/spec/models/track_notification_dto_spec.rb +58 -0
  142. data/spec/models/update_integration_dto_spec.rb +58 -0
  143. metadata +91 -2
@@ -0,0 +1,158 @@
1
+ =begin
2
+ #Notifo API
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.26
10
+ =end
11
+
12
+ module Notifo
13
+ class AuthorizationApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.default)
17
+ @api_client = api_client
18
+ end
19
+ # @param [Hash] opts the optional parameters
20
+ # @return [nil]
21
+ def authorization_authorize(opts = {})
22
+ authorization_authorize_with_http_info(opts)
23
+ nil
24
+ end
25
+
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
28
+ def authorization_authorize_with_http_info(opts = {})
29
+ if @api_client.config.debugging
30
+ @api_client.config.logger.debug 'Calling API: AuthorizationApi.authorization_authorize ...'
31
+ end
32
+ # resource path
33
+ local_var_path = '/connect/authorize'
34
+
35
+ # query parameters
36
+ query_params = opts[:query_params] || {}
37
+
38
+ # header parameters
39
+ header_params = opts[:header_params] || {}
40
+ # HTTP header 'Accept' (if needed)
41
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
42
+
43
+ # form parameters
44
+ form_params = opts[:form_params] || {}
45
+
46
+ # http body (model)
47
+ post_body = opts[:body]
48
+
49
+ return_type = opts[:return_type]
50
+
51
+ auth_names = opts[:auth_names] || []
52
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
53
+ :header_params => header_params,
54
+ :query_params => query_params,
55
+ :form_params => form_params,
56
+ :body => post_body,
57
+ :auth_names => auth_names,
58
+ :return_type => return_type)
59
+
60
+ if @api_client.config.debugging
61
+ @api_client.config.logger.debug "API called: AuthorizationApi#authorization_authorize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
62
+ end
63
+ return data, status_code, headers
64
+ end
65
+ # @param [Hash] opts the optional parameters
66
+ # @return [nil]
67
+ def authorization_exchange(opts = {})
68
+ authorization_exchange_with_http_info(opts)
69
+ nil
70
+ end
71
+
72
+ # @param [Hash] opts the optional parameters
73
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
74
+ def authorization_exchange_with_http_info(opts = {})
75
+ if @api_client.config.debugging
76
+ @api_client.config.logger.debug 'Calling API: AuthorizationApi.authorization_exchange ...'
77
+ end
78
+ # resource path
79
+ local_var_path = '/connect/token'
80
+
81
+ # query parameters
82
+ query_params = opts[:query_params] || {}
83
+
84
+ # header parameters
85
+ header_params = opts[:header_params] || {}
86
+ # HTTP header 'Accept' (if needed)
87
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
88
+
89
+ # form parameters
90
+ form_params = opts[:form_params] || {}
91
+
92
+ # http body (model)
93
+ post_body = opts[:body]
94
+
95
+ return_type = opts[:return_type]
96
+
97
+ auth_names = opts[:auth_names] || []
98
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
99
+ :header_params => header_params,
100
+ :query_params => query_params,
101
+ :form_params => form_params,
102
+ :body => post_body,
103
+ :auth_names => auth_names,
104
+ :return_type => return_type)
105
+
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug "API called: AuthorizationApi#authorization_exchange\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
108
+ end
109
+ return data, status_code, headers
110
+ end
111
+ # @param [Hash] opts the optional parameters
112
+ # @return [nil]
113
+ def authorization_logout(opts = {})
114
+ authorization_logout_with_http_info(opts)
115
+ nil
116
+ end
117
+
118
+ # @param [Hash] opts the optional parameters
119
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
120
+ def authorization_logout_with_http_info(opts = {})
121
+ if @api_client.config.debugging
122
+ @api_client.config.logger.debug 'Calling API: AuthorizationApi.authorization_logout ...'
123
+ end
124
+ # resource path
125
+ local_var_path = '/connect/logout'
126
+
127
+ # query parameters
128
+ query_params = opts[:query_params] || {}
129
+
130
+ # header parameters
131
+ header_params = opts[:header_params] || {}
132
+ # HTTP header 'Accept' (if needed)
133
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
134
+
135
+ # form parameters
136
+ form_params = opts[:form_params] || {}
137
+
138
+ # http body (model)
139
+ post_body = opts[:body]
140
+
141
+ return_type = opts[:return_type]
142
+
143
+ auth_names = opts[:auth_names] || []
144
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
145
+ :header_params => header_params,
146
+ :query_params => query_params,
147
+ :form_params => form_params,
148
+ :body => post_body,
149
+ :auth_names => auth_names,
150
+ :return_type => return_type)
151
+
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug "API called: AuthorizationApi#authorization_logout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
156
+ end
157
+ end
158
+ end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 1.0.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.24
9
+ Swagger Codegen version: 3.0.26
10
10
  =end
11
11
 
12
12
  module Notifo
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 1.0.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.24
9
+ Swagger Codegen version: 3.0.26
10
10
  =end
11
11
 
12
12
  module Notifo
@@ -141,5 +141,61 @@ module Notifo
141
141
  end
142
142
  return data, status_code, headers
143
143
  end
144
+ # Publish an event for the current user.
145
+ # @param body The publish request.
146
+ # @param [Hash] opts the optional parameters
147
+ # @return [nil]
148
+ def events_post_events2(body, opts = {})
149
+ events_post_events2_with_http_info(body, opts)
150
+ nil
151
+ end
152
+
153
+ # Publish an event for the current user.
154
+ # @param body The publish request.
155
+ # @param [Hash] opts the optional parameters
156
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
157
+ def events_post_events2_with_http_info(body, opts = {})
158
+ if @api_client.config.debugging
159
+ @api_client.config.logger.debug 'Calling API: EventsApi.events_post_events2 ...'
160
+ end
161
+ # verify the required parameter 'body' is set
162
+ if @api_client.config.client_side_validation && body.nil?
163
+ fail ArgumentError, "Missing the required parameter 'body' when calling EventsApi.events_post_events2"
164
+ end
165
+ # resource path
166
+ local_var_path = '/api/me/events'
167
+
168
+ # query parameters
169
+ query_params = opts[:query_params] || {}
170
+
171
+ # header parameters
172
+ header_params = opts[:header_params] || {}
173
+ # HTTP header 'Accept' (if needed)
174
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
175
+ # HTTP header 'Content-Type'
176
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
177
+
178
+ # form parameters
179
+ form_params = opts[:form_params] || {}
180
+
181
+ # http body (model)
182
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
183
+
184
+ return_type = opts[:return_type]
185
+
186
+ auth_names = opts[:auth_names] || []
187
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
188
+ :header_params => header_params,
189
+ :query_params => query_params,
190
+ :form_params => form_params,
191
+ :body => post_body,
192
+ :auth_names => auth_names,
193
+ :return_type => return_type)
194
+
195
+ if @api_client.config.debugging
196
+ @api_client.config.logger.debug "API called: EventsApi#events_post_events2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
197
+ end
198
+ return data, status_code, headers
199
+ end
144
200
  end
145
201
  end
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 1.0.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.24
9
+ Swagger Codegen version: 3.0.26
10
10
  =end
11
11
 
12
12
  module Notifo
@@ -6,7 +6,7 @@
6
6
  OpenAPI spec version: 1.0.0
7
7
 
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 3.0.24
9
+ Swagger Codegen version: 3.0.26
10
10
  =end
11
11
 
12
12
  module Notifo
@@ -0,0 +1,178 @@
1
+ =begin
2
+ #Notifo API
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.26
10
+ =end
11
+
12
+ module Notifo
13
+ class MobilePushApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.default)
17
+ @api_client = api_client
18
+ end
19
+ # Deletes a mobile push token for the current user.
20
+ # @param token The token to remove.
21
+ # @param [Hash] opts the optional parameters
22
+ # @return [nil]
23
+ def mobile_push_delete_token(token, opts = {})
24
+ mobile_push_delete_token_with_http_info(token, opts)
25
+ nil
26
+ end
27
+
28
+ # Deletes a mobile push token for the current user.
29
+ # @param token The token to remove.
30
+ # @param [Hash] opts the optional parameters
31
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
32
+ def mobile_push_delete_token_with_http_info(token, opts = {})
33
+ if @api_client.config.debugging
34
+ @api_client.config.logger.debug 'Calling API: MobilePushApi.mobile_push_delete_token ...'
35
+ end
36
+ # verify the required parameter 'token' is set
37
+ if @api_client.config.client_side_validation && token.nil?
38
+ fail ArgumentError, "Missing the required parameter 'token' when calling MobilePushApi.mobile_push_delete_token"
39
+ end
40
+ # resource path
41
+ local_var_path = '/api/me/mobilepush/{token}'.sub('{' + 'token' + '}', token.to_s)
42
+
43
+ # query parameters
44
+ query_params = opts[:query_params] || {}
45
+
46
+ # header parameters
47
+ header_params = opts[:header_params] || {}
48
+ # HTTP header 'Accept' (if needed)
49
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
50
+
51
+ # form parameters
52
+ form_params = opts[:form_params] || {}
53
+
54
+ # http body (model)
55
+ post_body = opts[:body]
56
+
57
+ return_type = opts[:return_type]
58
+
59
+ auth_names = opts[:auth_names] || []
60
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
61
+ :header_params => header_params,
62
+ :query_params => query_params,
63
+ :form_params => form_params,
64
+ :body => post_body,
65
+ :auth_names => auth_names,
66
+ :return_type => return_type)
67
+
68
+ if @api_client.config.debugging
69
+ @api_client.config.logger.debug "API called: MobilePushApi#mobile_push_delete_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
70
+ end
71
+ return data, status_code, headers
72
+ end
73
+ # Returns the mobile push tokens.
74
+ # @param [Hash] opts the optional parameters
75
+ # @return [ListResponseDtoOfMobilePushTokenDto]
76
+ def mobile_push_get_tokens(opts = {})
77
+ data, _status_code, _headers = mobile_push_get_tokens_with_http_info(opts)
78
+ data
79
+ end
80
+
81
+ # Returns the mobile push tokens.
82
+ # @param [Hash] opts the optional parameters
83
+ # @return [Array<(ListResponseDtoOfMobilePushTokenDto, Integer, Hash)>] ListResponseDtoOfMobilePushTokenDto data, response status code and response headers
84
+ def mobile_push_get_tokens_with_http_info(opts = {})
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug 'Calling API: MobilePushApi.mobile_push_get_tokens ...'
87
+ end
88
+ # resource path
89
+ local_var_path = '/api/me/mobilepush'
90
+
91
+ # query parameters
92
+ query_params = opts[:query_params] || {}
93
+
94
+ # header parameters
95
+ header_params = opts[:header_params] || {}
96
+ # HTTP header 'Accept' (if needed)
97
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
98
+
99
+ # form parameters
100
+ form_params = opts[:form_params] || {}
101
+
102
+ # http body (model)
103
+ post_body = opts[:body]
104
+
105
+ return_type = opts[:return_type] || 'ListResponseDtoOfMobilePushTokenDto'
106
+
107
+ auth_names = opts[:auth_names] || []
108
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
109
+ :header_params => header_params,
110
+ :query_params => query_params,
111
+ :form_params => form_params,
112
+ :body => post_body,
113
+ :auth_names => auth_names,
114
+ :return_type => return_type)
115
+
116
+ if @api_client.config.debugging
117
+ @api_client.config.logger.debug "API called: MobilePushApi#mobile_push_get_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
118
+ end
119
+ return data, status_code, headers
120
+ end
121
+ # Register a mobile push token for the current user.
122
+ # @param body The request object.
123
+ # @param [Hash] opts the optional parameters
124
+ # @return [nil]
125
+ def mobile_push_post_token(body, opts = {})
126
+ mobile_push_post_token_with_http_info(body, opts)
127
+ nil
128
+ end
129
+
130
+ # Register a mobile push token for the current user.
131
+ # @param body The request object.
132
+ # @param [Hash] opts the optional parameters
133
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
134
+ def mobile_push_post_token_with_http_info(body, opts = {})
135
+ if @api_client.config.debugging
136
+ @api_client.config.logger.debug 'Calling API: MobilePushApi.mobile_push_post_token ...'
137
+ end
138
+ # verify the required parameter 'body' is set
139
+ if @api_client.config.client_side_validation && body.nil?
140
+ fail ArgumentError, "Missing the required parameter 'body' when calling MobilePushApi.mobile_push_post_token"
141
+ end
142
+ # resource path
143
+ local_var_path = '/api/me/mobilepush'
144
+
145
+ # query parameters
146
+ query_params = opts[:query_params] || {}
147
+
148
+ # header parameters
149
+ header_params = opts[:header_params] || {}
150
+ # HTTP header 'Accept' (if needed)
151
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
152
+ # HTTP header 'Content-Type'
153
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
154
+
155
+ # form parameters
156
+ form_params = opts[:form_params] || {}
157
+
158
+ # http body (model)
159
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
160
+
161
+ return_type = opts[:return_type]
162
+
163
+ auth_names = opts[:auth_names] || []
164
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
165
+ :header_params => header_params,
166
+ :query_params => query_params,
167
+ :form_params => form_params,
168
+ :body => post_body,
169
+ :auth_names => auth_names,
170
+ :return_type => return_type)
171
+
172
+ if @api_client.config.debugging
173
+ @api_client.config.logger.debug "API called: MobilePushApi#mobile_push_post_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
174
+ end
175
+ return data, status_code, headers
176
+ end
177
+ end
178
+ end
@@ -0,0 +1,181 @@
1
+ =begin
2
+ #Notifo API
3
+
4
+ #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
+
6
+ OpenAPI spec version: 1.0.0
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.26
10
+ =end
11
+
12
+ module Notifo
13
+ class NotificationsApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.default)
17
+ @api_client = api_client
18
+ end
19
+ # Confirms the user notifications for the current user.
20
+ # @param body The request object.
21
+ # @param [Hash] opts the optional parameters
22
+ # @return [nil]
23
+ def notifications_confirm(body, opts = {})
24
+ notifications_confirm_with_http_info(body, opts)
25
+ nil
26
+ end
27
+
28
+ # Confirms the user notifications for the current user.
29
+ # @param body The request object.
30
+ # @param [Hash] opts the optional parameters
31
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
32
+ def notifications_confirm_with_http_info(body, opts = {})
33
+ if @api_client.config.debugging
34
+ @api_client.config.logger.debug 'Calling API: NotificationsApi.notifications_confirm ...'
35
+ end
36
+ # verify the required parameter 'body' is set
37
+ if @api_client.config.client_side_validation && body.nil?
38
+ fail ArgumentError, "Missing the required parameter 'body' when calling NotificationsApi.notifications_confirm"
39
+ end
40
+ # resource path
41
+ local_var_path = '/api/me/notifications/handled'
42
+
43
+ # query parameters
44
+ query_params = opts[:query_params] || {}
45
+
46
+ # header parameters
47
+ header_params = opts[:header_params] || {}
48
+ # HTTP header 'Accept' (if needed)
49
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
50
+ # HTTP header 'Content-Type'
51
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
52
+
53
+ # form parameters
54
+ form_params = opts[:form_params] || {}
55
+
56
+ # http body (model)
57
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
58
+
59
+ return_type = opts[:return_type]
60
+
61
+ auth_names = opts[:auth_names] || []
62
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
63
+ :header_params => header_params,
64
+ :query_params => query_params,
65
+ :form_params => form_params,
66
+ :body => post_body,
67
+ :auth_names => auth_names,
68
+ :return_type => return_type)
69
+
70
+ if @api_client.config.debugging
71
+ @api_client.config.logger.debug "API called: NotificationsApi#notifications_confirm\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
72
+ end
73
+ return data, status_code, headers
74
+ end
75
+ # Query archhived user notifications of the current user.
76
+ # @param [Hash] opts the optional parameters
77
+ # @return [ListResponseDtoOfNotificationDto]
78
+ def notifications_get_archive(opts = {})
79
+ data, _status_code, _headers = notifications_get_archive_with_http_info(opts)
80
+ data
81
+ end
82
+
83
+ # Query archhived user notifications of the current user.
84
+ # @param [Hash] opts the optional parameters
85
+ # @return [Array<(ListResponseDtoOfNotificationDto, Integer, Hash)>] ListResponseDtoOfNotificationDto data, response status code and response headers
86
+ def notifications_get_archive_with_http_info(opts = {})
87
+ if @api_client.config.debugging
88
+ @api_client.config.logger.debug 'Calling API: NotificationsApi.notifications_get_archive ...'
89
+ end
90
+ # resource path
91
+ local_var_path = '/api/me/notifications/archive'
92
+
93
+ # query parameters
94
+ query_params = opts[:query_params] || {}
95
+
96
+ # header parameters
97
+ header_params = opts[:header_params] || {}
98
+ # HTTP header 'Accept' (if needed)
99
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
100
+
101
+ # form parameters
102
+ form_params = opts[:form_params] || {}
103
+
104
+ # http body (model)
105
+ post_body = opts[:body]
106
+
107
+ return_type = opts[:return_type] || 'ListResponseDtoOfNotificationDto'
108
+
109
+ auth_names = opts[:auth_names] || []
110
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
111
+ :header_params => header_params,
112
+ :query_params => query_params,
113
+ :form_params => form_params,
114
+ :body => post_body,
115
+ :auth_names => auth_names,
116
+ :return_type => return_type)
117
+
118
+ if @api_client.config.debugging
119
+ @api_client.config.logger.debug "API called: NotificationsApi#notifications_get_archive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
120
+ end
121
+ return data, status_code, headers
122
+ end
123
+ # Query user notifications of the current user.
124
+ # @param [Hash] opts the optional parameters
125
+ # @option opts [String] :query The optional query to search for items.
126
+ # @option opts [Integer] :take The number of items to return.
127
+ # @option opts [Integer] :skip The number of items to skip.
128
+ # @return [ListResponseDtoOfNotificationDto]
129
+ def notifications_get_notifications(opts = {})
130
+ data, _status_code, _headers = notifications_get_notifications_with_http_info(opts)
131
+ data
132
+ end
133
+
134
+ # Query user notifications of the current user.
135
+ # @param [Hash] opts the optional parameters
136
+ # @option opts [String] :query The optional query to search for items.
137
+ # @option opts [Integer] :take The number of items to return.
138
+ # @option opts [Integer] :skip The number of items to skip.
139
+ # @return [Array<(ListResponseDtoOfNotificationDto, Integer, Hash)>] ListResponseDtoOfNotificationDto data, response status code and response headers
140
+ def notifications_get_notifications_with_http_info(opts = {})
141
+ if @api_client.config.debugging
142
+ @api_client.config.logger.debug 'Calling API: NotificationsApi.notifications_get_notifications ...'
143
+ end
144
+ # resource path
145
+ local_var_path = '/api/me/notifications'
146
+
147
+ # query parameters
148
+ query_params = opts[:query_params] || {}
149
+ query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
150
+ query_params[:'take'] = opts[:'take'] if !opts[:'take'].nil?
151
+ query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
152
+
153
+ # header parameters
154
+ header_params = opts[:header_params] || {}
155
+ # HTTP header 'Accept' (if needed)
156
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
157
+
158
+ # form parameters
159
+ form_params = opts[:form_params] || {}
160
+
161
+ # http body (model)
162
+ post_body = opts[:body]
163
+
164
+ return_type = opts[:return_type] || 'ListResponseDtoOfNotificationDto'
165
+
166
+ auth_names = opts[:auth_names] || []
167
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
168
+ :header_params => header_params,
169
+ :query_params => query_params,
170
+ :form_params => form_params,
171
+ :body => post_body,
172
+ :auth_names => auth_names,
173
+ :return_type => return_type)
174
+
175
+ if @api_client.config.debugging
176
+ @api_client.config.logger.debug "API called: NotificationsApi#notifications_get_notifications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
177
+ end
178
+ return data, status_code, headers
179
+ end
180
+ end
181
+ end