notifo-io 1.0.0.1 → 1.0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -7
- data/docs/{AddAllowedTopicRequest.md → AddAllowedTopicDto.md} +2 -2
- data/docs/AppDetailsDto.md +2 -2
- data/docs/AppDto.md +1 -1
- data/docs/EventDto.md +5 -5
- data/docs/EventsApi.md +6 -6
- data/docs/MediaApi.md +2 -2
- data/docs/MediaDto.md +2 -2
- data/docs/NotificationFormattingDto.md +8 -8
- data/docs/NotificationSend.md +15 -0
- data/docs/NotificationSettingDto.md +1 -1
- data/docs/ProfileDto.md +32 -0
- data/docs/{PublishRequestDto.md → PublishDto.md} +5 -5
- data/docs/PublishManyDto.md +18 -0
- data/docs/SchedulingDto.md +2 -2
- data/docs/SubscriptionDto.md +1 -1
- data/docs/TemplateDto.md +2 -2
- data/docs/TopicDto.md +1 -1
- data/docs/TopicsApi.md +0 -192
- data/docs/UpdateProfileDto.md +28 -0
- data/docs/UpsertTemplateDto.md +2 -2
- data/docs/UpsertUserDto.md +1 -1
- data/docs/UserApi.md +323 -0
- data/docs/UserDto.md +2 -2
- data/docs/UsersApi.md +12 -12
- data/lib/notifo.rb +7 -4
- data/lib/notifo/api/events_api.rb +9 -9
- data/lib/notifo/api/media_api.rb +2 -2
- data/lib/notifo/api/topics_api.rb +0 -189
- data/lib/notifo/api/user_api.rb +331 -0
- data/lib/notifo/api/users_api.rb +18 -18
- data/lib/notifo/models/{add_allowed_topic_request.rb → add_allowed_topic_dto.rb} +3 -3
- data/lib/notifo/models/app_details_dto.rb +5 -4
- data/lib/notifo/models/app_dto.rb +4 -2
- data/lib/notifo/models/event_dto.rb +14 -11
- data/lib/notifo/models/media_dto.rb +5 -5
- data/lib/notifo/models/notification_formatting_dto.rb +29 -29
- data/lib/notifo/models/notification_send.rb +39 -0
- data/lib/notifo/models/notification_setting_dto.rb +1 -3
- data/lib/notifo/models/profile_dto.rb +295 -0
- data/lib/notifo/models/{publish_request_dto.rb → publish_dto.rb} +10 -11
- data/lib/notifo/models/{publish_many_request_dto.rb → publish_many_dto.rb} +4 -4
- data/lib/notifo/models/scheduling_dto.rb +2 -5
- data/lib/notifo/models/subscription_dto.rb +5 -2
- data/lib/notifo/models/template_dto.rb +5 -4
- data/lib/notifo/models/topic_dto.rb +4 -2
- data/lib/notifo/models/{subscribe_dto.rb → update_profile_dto.rb} +65 -17
- data/lib/notifo/models/upsert_template_dto.rb +5 -4
- data/lib/notifo/models/upsert_user_dto.rb +4 -2
- data/lib/notifo/models/user_dto.rb +8 -4
- data/notifo-1.0.0.gem +0 -0
- data/notifo-io-1.0.0.gem +0 -0
- data/notifo.gemspec +5 -5
- data/spec/api/events_api_spec.rb +1 -1
- data/spec/api/media_api_spec.rb +1 -1
- data/spec/api/topics_api_spec.rb +0 -36
- data/spec/api/user_api_spec.rb +92 -0
- data/spec/api/users_api_spec.rb +2 -2
- data/spec/models/{add_allowed_topic_request_spec.rb → add_allowed_topic_dto_spec.rb} +6 -6
- data/spec/models/notification_send_spec.rb +28 -0
- data/spec/models/profile_dto_spec.rb +76 -0
- data/spec/models/{publish_request_dto_spec.rb → publish_dto_spec.rb} +6 -6
- data/spec/models/{publish_many_request_dto_spec.rb → publish_many_dto_spec.rb} +6 -6
- data/spec/models/update_profile_dto_spec.rb +64 -0
- metadata +35 -25
- data/docs/PublishManyRequestDto.md +0 -18
- data/docs/SubscribeDto.md +0 -20
- data/notifo-io-1.0.0.pre.beta.gem +0 -0
- data/notifo-io-1.0.0.pre.gem +0 -0
- data/spec/models/subscribe_dto_spec.rb +0 -40
@@ -0,0 +1,28 @@
|
|
1
|
+
# Notifo::UpdateProfileDto
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **full_name** | **String** | The full name of the user. | [optional] |
|
8
|
+
| **email_address** | **String** | The email of the user. | [optional] |
|
9
|
+
| **phone_number** | **String** | The phone number. | [optional] |
|
10
|
+
| **preferred_language** | **String** | The preferred language of the user. | [optional] |
|
11
|
+
| **preferred_timezone** | **String** | The timezone of the user. | [optional] |
|
12
|
+
| **settings** | [**Hash<String, NotificationSettingDto>**](NotificationSettingDto.md) | Notification settings per channel. | [optional] |
|
13
|
+
|
14
|
+
## Example
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'notifo'
|
18
|
+
|
19
|
+
instance = Notifo::UpdateProfileDto.new(
|
20
|
+
full_name: null,
|
21
|
+
email_address: null,
|
22
|
+
phone_number: null,
|
23
|
+
preferred_language: null,
|
24
|
+
preferred_timezone: null,
|
25
|
+
settings: null
|
26
|
+
)
|
27
|
+
```
|
28
|
+
|
data/docs/UpsertTemplateDto.md
CHANGED
@@ -5,8 +5,8 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **code** | **String** | The code of the template. | [optional] |
|
8
|
-
| **formatting** | [**
|
9
|
-
| **settings** | [**
|
8
|
+
| **formatting** | [**NotificationFormattingDto**](NotificationFormattingDto.md) | | [optional] |
|
9
|
+
| **settings** | [**Hash<String, NotificationSettingDto>**](NotificationSettingDto.md) | Notification settings per channel. | [optional] |
|
10
10
|
|
11
11
|
## Example
|
12
12
|
|
data/docs/UpsertUserDto.md
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
| **preferred_language** | **String** | The preferred language of the user. | [optional] |
|
12
12
|
| **preferred_timezone** | **String** | The timezone of the user. | [optional] |
|
13
13
|
| **requires_whitelisted_topics** | **Boolean** | True when only whitelisted topic are allowed. | [optional] |
|
14
|
-
| **settings** | [**
|
14
|
+
| **settings** | [**Hash<String, NotificationSettingDto>**](NotificationSettingDto.md) | Notification settings per channel. | [optional] |
|
15
15
|
|
16
16
|
## Example
|
17
17
|
|
data/docs/UserApi.md
ADDED
@@ -0,0 +1,323 @@
|
|
1
|
+
# Notifo::UserApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://app.notifo.io*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**user_delete_subscription**](UserApi.md#user_delete_subscription) | **DELETE** /api/me/subscriptions/{topic} | Deletes a user subscription. |
|
8
|
+
| [**user_get_subscription**](UserApi.md#user_get_subscription) | **GET** /api/me/subscriptions/{topic} | Gets a user subscription. |
|
9
|
+
| [**user_get_user**](UserApi.md#user_get_user) | **GET** /api/me | Get the current user. |
|
10
|
+
| [**user_post_subscription**](UserApi.md#user_post_subscription) | **POST** /api/me/subscriptions | Creates a user subscription. |
|
11
|
+
| [**user_post_user**](UserApi.md#user_post_user) | **POST** /api/me | Update the user. |
|
12
|
+
|
13
|
+
|
14
|
+
## user_delete_subscription
|
15
|
+
|
16
|
+
> user_delete_subscription(topic)
|
17
|
+
|
18
|
+
Deletes a user subscription.
|
19
|
+
|
20
|
+
User Id and App Id are resolved using the API token.
|
21
|
+
|
22
|
+
### Examples
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require 'time'
|
26
|
+
require 'notifo'
|
27
|
+
|
28
|
+
api_instance = Notifo::UserApi.new
|
29
|
+
topic = 'topic_example' # String | The topic path.
|
30
|
+
|
31
|
+
begin
|
32
|
+
# Deletes a user subscription.
|
33
|
+
api_instance.user_delete_subscription(topic)
|
34
|
+
rescue Notifo::ApiError => e
|
35
|
+
puts "Error when calling UserApi->user_delete_subscription: #{e}"
|
36
|
+
end
|
37
|
+
```
|
38
|
+
|
39
|
+
#### Using the user_delete_subscription_with_http_info variant
|
40
|
+
|
41
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
42
|
+
|
43
|
+
> <Array(nil, Integer, Hash)> user_delete_subscription_with_http_info(topic)
|
44
|
+
|
45
|
+
```ruby
|
46
|
+
begin
|
47
|
+
# Deletes a user subscription.
|
48
|
+
data, status_code, headers = api_instance.user_delete_subscription_with_http_info(topic)
|
49
|
+
p status_code # => 2xx
|
50
|
+
p headers # => { ... }
|
51
|
+
p data # => nil
|
52
|
+
rescue Notifo::ApiError => e
|
53
|
+
puts "Error when calling UserApi->user_delete_subscription_with_http_info: #{e}"
|
54
|
+
end
|
55
|
+
```
|
56
|
+
|
57
|
+
### Parameters
|
58
|
+
|
59
|
+
| Name | Type | Description | Notes |
|
60
|
+
| ---- | ---- | ----------- | ----- |
|
61
|
+
| **topic** | **String** | The topic path. | |
|
62
|
+
|
63
|
+
### Return type
|
64
|
+
|
65
|
+
nil (empty response body)
|
66
|
+
|
67
|
+
### Authorization
|
68
|
+
|
69
|
+
No authorization required
|
70
|
+
|
71
|
+
### HTTP request headers
|
72
|
+
|
73
|
+
- **Content-Type**: Not defined
|
74
|
+
- **Accept**: application/json
|
75
|
+
|
76
|
+
|
77
|
+
## user_get_subscription
|
78
|
+
|
79
|
+
> <SubscriptionDto> user_get_subscription(topic)
|
80
|
+
|
81
|
+
Gets a user subscription.
|
82
|
+
|
83
|
+
User Id and App Id are resolved using the API token.
|
84
|
+
|
85
|
+
### Examples
|
86
|
+
|
87
|
+
```ruby
|
88
|
+
require 'time'
|
89
|
+
require 'notifo'
|
90
|
+
|
91
|
+
api_instance = Notifo::UserApi.new
|
92
|
+
topic = 'topic_example' # String | The topic path.
|
93
|
+
|
94
|
+
begin
|
95
|
+
# Gets a user subscription.
|
96
|
+
result = api_instance.user_get_subscription(topic)
|
97
|
+
p result
|
98
|
+
rescue Notifo::ApiError => e
|
99
|
+
puts "Error when calling UserApi->user_get_subscription: #{e}"
|
100
|
+
end
|
101
|
+
```
|
102
|
+
|
103
|
+
#### Using the user_get_subscription_with_http_info variant
|
104
|
+
|
105
|
+
This returns an Array which contains the response data, status code and headers.
|
106
|
+
|
107
|
+
> <Array(<SubscriptionDto>, Integer, Hash)> user_get_subscription_with_http_info(topic)
|
108
|
+
|
109
|
+
```ruby
|
110
|
+
begin
|
111
|
+
# Gets a user subscription.
|
112
|
+
data, status_code, headers = api_instance.user_get_subscription_with_http_info(topic)
|
113
|
+
p status_code # => 2xx
|
114
|
+
p headers # => { ... }
|
115
|
+
p data # => <SubscriptionDto>
|
116
|
+
rescue Notifo::ApiError => e
|
117
|
+
puts "Error when calling UserApi->user_get_subscription_with_http_info: #{e}"
|
118
|
+
end
|
119
|
+
```
|
120
|
+
|
121
|
+
### Parameters
|
122
|
+
|
123
|
+
| Name | Type | Description | Notes |
|
124
|
+
| ---- | ---- | ----------- | ----- |
|
125
|
+
| **topic** | **String** | The topic path. | |
|
126
|
+
|
127
|
+
### Return type
|
128
|
+
|
129
|
+
[**SubscriptionDto**](SubscriptionDto.md)
|
130
|
+
|
131
|
+
### Authorization
|
132
|
+
|
133
|
+
No authorization required
|
134
|
+
|
135
|
+
### HTTP request headers
|
136
|
+
|
137
|
+
- **Content-Type**: Not defined
|
138
|
+
- **Accept**: application/json
|
139
|
+
|
140
|
+
|
141
|
+
## user_get_user
|
142
|
+
|
143
|
+
> <ProfileDto> user_get_user
|
144
|
+
|
145
|
+
Get the current user.
|
146
|
+
|
147
|
+
### Examples
|
148
|
+
|
149
|
+
```ruby
|
150
|
+
require 'time'
|
151
|
+
require 'notifo'
|
152
|
+
|
153
|
+
api_instance = Notifo::UserApi.new
|
154
|
+
|
155
|
+
begin
|
156
|
+
# Get the current user.
|
157
|
+
result = api_instance.user_get_user
|
158
|
+
p result
|
159
|
+
rescue Notifo::ApiError => e
|
160
|
+
puts "Error when calling UserApi->user_get_user: #{e}"
|
161
|
+
end
|
162
|
+
```
|
163
|
+
|
164
|
+
#### Using the user_get_user_with_http_info variant
|
165
|
+
|
166
|
+
This returns an Array which contains the response data, status code and headers.
|
167
|
+
|
168
|
+
> <Array(<ProfileDto>, Integer, Hash)> user_get_user_with_http_info
|
169
|
+
|
170
|
+
```ruby
|
171
|
+
begin
|
172
|
+
# Get the current user.
|
173
|
+
data, status_code, headers = api_instance.user_get_user_with_http_info
|
174
|
+
p status_code # => 2xx
|
175
|
+
p headers # => { ... }
|
176
|
+
p data # => <ProfileDto>
|
177
|
+
rescue Notifo::ApiError => e
|
178
|
+
puts "Error when calling UserApi->user_get_user_with_http_info: #{e}"
|
179
|
+
end
|
180
|
+
```
|
181
|
+
|
182
|
+
### Parameters
|
183
|
+
|
184
|
+
This endpoint does not need any parameter.
|
185
|
+
|
186
|
+
### Return type
|
187
|
+
|
188
|
+
[**ProfileDto**](ProfileDto.md)
|
189
|
+
|
190
|
+
### Authorization
|
191
|
+
|
192
|
+
No authorization required
|
193
|
+
|
194
|
+
### HTTP request headers
|
195
|
+
|
196
|
+
- **Content-Type**: Not defined
|
197
|
+
- **Accept**: application/json
|
198
|
+
|
199
|
+
|
200
|
+
## user_post_subscription
|
201
|
+
|
202
|
+
> user_post_subscription(subscription_dto)
|
203
|
+
|
204
|
+
Creates a user subscription.
|
205
|
+
|
206
|
+
User Id and App Id are resolved using the API token.
|
207
|
+
|
208
|
+
### Examples
|
209
|
+
|
210
|
+
```ruby
|
211
|
+
require 'time'
|
212
|
+
require 'notifo'
|
213
|
+
|
214
|
+
api_instance = Notifo::UserApi.new
|
215
|
+
subscription_dto = Notifo::SubscriptionDto.new # SubscriptionDto | The subscription settings.
|
216
|
+
|
217
|
+
begin
|
218
|
+
# Creates a user subscription.
|
219
|
+
api_instance.user_post_subscription(subscription_dto)
|
220
|
+
rescue Notifo::ApiError => e
|
221
|
+
puts "Error when calling UserApi->user_post_subscription: #{e}"
|
222
|
+
end
|
223
|
+
```
|
224
|
+
|
225
|
+
#### Using the user_post_subscription_with_http_info variant
|
226
|
+
|
227
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
228
|
+
|
229
|
+
> <Array(nil, Integer, Hash)> user_post_subscription_with_http_info(subscription_dto)
|
230
|
+
|
231
|
+
```ruby
|
232
|
+
begin
|
233
|
+
# Creates a user subscription.
|
234
|
+
data, status_code, headers = api_instance.user_post_subscription_with_http_info(subscription_dto)
|
235
|
+
p status_code # => 2xx
|
236
|
+
p headers # => { ... }
|
237
|
+
p data # => nil
|
238
|
+
rescue Notifo::ApiError => e
|
239
|
+
puts "Error when calling UserApi->user_post_subscription_with_http_info: #{e}"
|
240
|
+
end
|
241
|
+
```
|
242
|
+
|
243
|
+
### Parameters
|
244
|
+
|
245
|
+
| Name | Type | Description | Notes |
|
246
|
+
| ---- | ---- | ----------- | ----- |
|
247
|
+
| **subscription_dto** | [**SubscriptionDto**](SubscriptionDto.md) | The subscription settings. | |
|
248
|
+
|
249
|
+
### Return type
|
250
|
+
|
251
|
+
nil (empty response body)
|
252
|
+
|
253
|
+
### Authorization
|
254
|
+
|
255
|
+
No authorization required
|
256
|
+
|
257
|
+
### HTTP request headers
|
258
|
+
|
259
|
+
- **Content-Type**: application/json
|
260
|
+
- **Accept**: application/json
|
261
|
+
|
262
|
+
|
263
|
+
## user_post_user
|
264
|
+
|
265
|
+
> <ProfileDto> user_post_user(update_profile_dto)
|
266
|
+
|
267
|
+
Update the user.
|
268
|
+
|
269
|
+
### Examples
|
270
|
+
|
271
|
+
```ruby
|
272
|
+
require 'time'
|
273
|
+
require 'notifo'
|
274
|
+
|
275
|
+
api_instance = Notifo::UserApi.new
|
276
|
+
update_profile_dto = Notifo::UpdateProfileDto.new # UpdateProfileDto | The upsert request.
|
277
|
+
|
278
|
+
begin
|
279
|
+
# Update the user.
|
280
|
+
result = api_instance.user_post_user(update_profile_dto)
|
281
|
+
p result
|
282
|
+
rescue Notifo::ApiError => e
|
283
|
+
puts "Error when calling UserApi->user_post_user: #{e}"
|
284
|
+
end
|
285
|
+
```
|
286
|
+
|
287
|
+
#### Using the user_post_user_with_http_info variant
|
288
|
+
|
289
|
+
This returns an Array which contains the response data, status code and headers.
|
290
|
+
|
291
|
+
> <Array(<ProfileDto>, Integer, Hash)> user_post_user_with_http_info(update_profile_dto)
|
292
|
+
|
293
|
+
```ruby
|
294
|
+
begin
|
295
|
+
# Update the user.
|
296
|
+
data, status_code, headers = api_instance.user_post_user_with_http_info(update_profile_dto)
|
297
|
+
p status_code # => 2xx
|
298
|
+
p headers # => { ... }
|
299
|
+
p data # => <ProfileDto>
|
300
|
+
rescue Notifo::ApiError => e
|
301
|
+
puts "Error when calling UserApi->user_post_user_with_http_info: #{e}"
|
302
|
+
end
|
303
|
+
```
|
304
|
+
|
305
|
+
### Parameters
|
306
|
+
|
307
|
+
| Name | Type | Description | Notes |
|
308
|
+
| ---- | ---- | ----------- | ----- |
|
309
|
+
| **update_profile_dto** | [**UpdateProfileDto**](UpdateProfileDto.md) | The upsert request. | |
|
310
|
+
|
311
|
+
### Return type
|
312
|
+
|
313
|
+
[**ProfileDto**](ProfileDto.md)
|
314
|
+
|
315
|
+
### Authorization
|
316
|
+
|
317
|
+
No authorization required
|
318
|
+
|
319
|
+
### HTTP request headers
|
320
|
+
|
321
|
+
- **Content-Type**: application/json
|
322
|
+
- **Accept**: application/json
|
323
|
+
|
data/docs/UserDto.md
CHANGED
@@ -12,8 +12,8 @@
|
|
12
12
|
| **preferred_language** | **String** | The preferred language of the user. | [optional] |
|
13
13
|
| **preferred_timezone** | **String** | The timezone of the user. | [optional] |
|
14
14
|
| **requires_whitelisted_topics** | **Boolean** | True when only whitelisted topic are allowed. | [optional] |
|
15
|
-
| **settings** | [**
|
16
|
-
| **counters** |
|
15
|
+
| **settings** | [**Hash<String, NotificationSettingDto>**](NotificationSettingDto.md) | Notification settings per channel. | [optional] |
|
16
|
+
| **counters** | **Hash<String, Integer>** | The statistics counters. | [optional] |
|
17
17
|
|
18
18
|
## Example
|
19
19
|
|
data/docs/UsersApi.md
CHANGED
@@ -417,7 +417,7 @@ No authorization required
|
|
417
417
|
|
418
418
|
## users_post_allowed_topic
|
419
419
|
|
420
|
-
> users_post_allowed_topic(app_id, id,
|
420
|
+
> users_post_allowed_topic(app_id, id, add_allowed_topic_dto)
|
421
421
|
|
422
422
|
Add an allowed topic.
|
423
423
|
|
@@ -430,11 +430,11 @@ require 'notifo'
|
|
430
430
|
api_instance = Notifo::UsersApi.new
|
431
431
|
app_id = 'app_id_example' # String | The app where the users belong to.
|
432
432
|
id = 'id_example' # String | The user id.
|
433
|
-
|
433
|
+
add_allowed_topic_dto = Notifo::AddAllowedTopicDto.new # AddAllowedTopicDto | The upsert request.
|
434
434
|
|
435
435
|
begin
|
436
436
|
# Add an allowed topic.
|
437
|
-
api_instance.users_post_allowed_topic(app_id, id,
|
437
|
+
api_instance.users_post_allowed_topic(app_id, id, add_allowed_topic_dto)
|
438
438
|
rescue Notifo::ApiError => e
|
439
439
|
puts "Error when calling UsersApi->users_post_allowed_topic: #{e}"
|
440
440
|
end
|
@@ -444,12 +444,12 @@ end
|
|
444
444
|
|
445
445
|
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
446
446
|
|
447
|
-
> <Array(nil, Integer, Hash)> users_post_allowed_topic_with_http_info(app_id, id,
|
447
|
+
> <Array(nil, Integer, Hash)> users_post_allowed_topic_with_http_info(app_id, id, add_allowed_topic_dto)
|
448
448
|
|
449
449
|
```ruby
|
450
450
|
begin
|
451
451
|
# Add an allowed topic.
|
452
|
-
data, status_code, headers = api_instance.users_post_allowed_topic_with_http_info(app_id, id,
|
452
|
+
data, status_code, headers = api_instance.users_post_allowed_topic_with_http_info(app_id, id, add_allowed_topic_dto)
|
453
453
|
p status_code # => 2xx
|
454
454
|
p headers # => { ... }
|
455
455
|
p data # => nil
|
@@ -464,7 +464,7 @@ end
|
|
464
464
|
| ---- | ---- | ----------- | ----- |
|
465
465
|
| **app_id** | **String** | The app where the users belong to. | |
|
466
466
|
| **id** | **String** | The user id. | |
|
467
|
-
| **
|
467
|
+
| **add_allowed_topic_dto** | [**AddAllowedTopicDto**](AddAllowedTopicDto.md) | The upsert request. | |
|
468
468
|
|
469
469
|
### Return type
|
470
470
|
|
@@ -482,7 +482,7 @@ No authorization required
|
|
482
482
|
|
483
483
|
## users_post_subscription
|
484
484
|
|
485
|
-
> users_post_subscription(app_id, id,
|
485
|
+
> users_post_subscription(app_id, id, subscription_dto)
|
486
486
|
|
487
487
|
Upsert a user subscriptions.
|
488
488
|
|
@@ -495,11 +495,11 @@ require 'notifo'
|
|
495
495
|
api_instance = Notifo::UsersApi.new
|
496
496
|
app_id = 'app_id_example' # String | The app where the user belongs to.
|
497
497
|
id = 'id_example' # String | The user id.
|
498
|
-
|
498
|
+
subscription_dto = Notifo::SubscriptionDto.new # SubscriptionDto | The subscription object.
|
499
499
|
|
500
500
|
begin
|
501
501
|
# Upsert a user subscriptions.
|
502
|
-
api_instance.users_post_subscription(app_id, id,
|
502
|
+
api_instance.users_post_subscription(app_id, id, subscription_dto)
|
503
503
|
rescue Notifo::ApiError => e
|
504
504
|
puts "Error when calling UsersApi->users_post_subscription: #{e}"
|
505
505
|
end
|
@@ -509,12 +509,12 @@ end
|
|
509
509
|
|
510
510
|
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
511
511
|
|
512
|
-
> <Array(nil, Integer, Hash)> users_post_subscription_with_http_info(app_id, id,
|
512
|
+
> <Array(nil, Integer, Hash)> users_post_subscription_with_http_info(app_id, id, subscription_dto)
|
513
513
|
|
514
514
|
```ruby
|
515
515
|
begin
|
516
516
|
# Upsert a user subscriptions.
|
517
|
-
data, status_code, headers = api_instance.users_post_subscription_with_http_info(app_id, id,
|
517
|
+
data, status_code, headers = api_instance.users_post_subscription_with_http_info(app_id, id, subscription_dto)
|
518
518
|
p status_code # => 2xx
|
519
519
|
p headers # => { ... }
|
520
520
|
p data # => nil
|
@@ -529,7 +529,7 @@ end
|
|
529
529
|
| ---- | ---- | ----------- | ----- |
|
530
530
|
| **app_id** | **String** | The app where the user belongs to. | |
|
531
531
|
| **id** | **String** | The user id. | |
|
532
|
-
| **
|
532
|
+
| **subscription_dto** | [**SubscriptionDto**](SubscriptionDto.md) | The subscription object. | |
|
533
533
|
|
534
534
|
### Return type
|
535
535
|
|