@@ -6,8 +6,8 @@ A powerful way to send personalized messages at scale and build effective custom
6
6
7
7
This SDK is automatically generated by the [ OpenAPI Generator] ( https://openapi-generator.tech ) project:
8
8
9
- - API version: 1.4.0
10
- - Package version: 2.2.0
9
+ - API version: 5.0.1
10
+ - Package version: 5.0.0-beta1
11
11
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
For more information, please visit [ https://onesignal.com ] ( https://onesignal.com )
13
13
@@ -24,16 +24,16 @@ gem build onesignal.gemspec
24
24
Then either install the gem locally:
25
25
26
26
``` shell
27
- gem install ./onesignal-2.2.0 .gem
27
+ gem install ./onesignal-5.0.0-beta1 .gem
28
28
```
29
29
30
- (for development, run ` gem install --dev ./onesignal-2.2.0 .gem ` to install the development dependencies)
30
+ (for development, run ` gem install --dev ./onesignal-5.0.0-beta1 .gem ` to install the development dependencies)
31
31
32
32
or publish the gem to a gem hosting service, e.g. [ RubyGems] ( https://rubygems.org/ ) .
33
33
34
34
Finally add this to the Gemfile:
35
35
36
- gem 'onesignal', '~> 2.2.0 '
36
+ gem 'onesignal', '~> 5.0.0-beta1 '
37
37
38
38
### Install from Git
39
39
@@ -59,22 +59,20 @@ require 'onesignal'
59
59
60
60
# Setup authorization
61
61
OneSignal .configure do |config |
62
- # Configure Bearer authorization: user_key
63
- config.user_key = ' ORGANIZATION_API_KEY' # Organization key is only required for creating new apps and other top-level endpoints
64
- # Configure Bearer authorization: app_key
65
- config.app_key = ' REST_API_KEY' # App REST API key required for most endpoints
62
+ # Configure Bearer authorization: rest_api_key
63
+ config.access_token = ' YOUR_BEARER_TOKEN'
66
64
end
67
65
68
66
api_instance = OneSignal ::DefaultApi .new
69
- app_id = ' app_id_example' # String | The OneSignal App ID for your app. Available in Keys & IDs.
70
- activity_id = ' activity_id_example' # String | Live Activity record ID
71
- begin_live_activity_request = OneSignal ::BeginLiveActivityRequest .new ({push_token: ' push_token_example' , subscription_id: ' subscription_id_example' }) # BeginLiveActivityRequest |
67
+ app_id = ' app_id_example' # String |
68
+ notification_id = ' notification_id_example' # String |
72
69
73
70
begin
74
- # Start Live Activity
75
- api_instance.begin_live_activity(app_id, activity_id, begin_live_activity_request)
71
+ # Stop a scheduled or currently outgoing notification
72
+ result = api_instance.cancel_notification(app_id, notification_id)
73
+ p result
76
74
rescue OneSignal ::ApiError => e
77
- puts " Exception when calling DefaultApi->begin_live_activity : #{ e } "
75
+ puts " Exception when calling DefaultApi->cancel_notification : #{ e } "
78
76
end
79
77
80
78
```
@@ -85,41 +83,34 @@ All URIs are relative to *https://api.onesignal.com*
85
83
86
84
Class | Method | HTTP request | Description
87
85
------------ | ------------- | ------------- | -------------
88
- * OneSignal::DefaultApi* | [ ** begin_live_activity** ] ( docs/DefaultApi.md#begin_live_activity ) | ** POST** /apps/{app_id}/live_activities/{activity_id}/token | Start Live Activity
89
86
* OneSignal::DefaultApi* | [ ** cancel_notification** ] ( docs/DefaultApi.md#cancel_notification ) | ** DELETE** /notifications/{notification_id} | Stop a scheduled or currently outgoing notification
87
+ * OneSignal::DefaultApi* | [ ** create_alias** ] ( docs/DefaultApi.md#create_alias ) | ** PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
88
+ * OneSignal::DefaultApi* | [ ** create_alias_by_subscription** ] ( docs/DefaultApi.md#create_alias_by_subscription ) | ** PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
90
89
* OneSignal::DefaultApi* | [ ** create_app** ] ( docs/DefaultApi.md#create_app ) | ** POST** /apps | Create an app
91
90
* OneSignal::DefaultApi* | [ ** create_notification** ] ( docs/DefaultApi.md#create_notification ) | ** POST** /notifications | Create notification
92
- * OneSignal::DefaultApi* | [ ** create_player** ] ( docs/DefaultApi.md#create_player ) | ** POST** /players | Add a device
93
- * OneSignal::DefaultApi* | [ ** create_segments** ] ( docs/DefaultApi.md#create_segments ) | ** POST** /apps/{app_id}/segments | Create Segments
91
+ * OneSignal::DefaultApi* | [ ** create_segment** ] ( docs/DefaultApi.md#create_segment ) | ** POST** /apps/{app_id}/segments | Create Segment
94
92
* OneSignal::DefaultApi* | [ ** create_subscription** ] ( docs/DefaultApi.md#create_subscription ) | ** POST** /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions |
95
93
* OneSignal::DefaultApi* | [ ** create_user** ] ( docs/DefaultApi.md#create_user ) | ** POST** /apps/{app_id}/users |
96
94
* OneSignal::DefaultApi* | [ ** delete_alias** ] ( docs/DefaultApi.md#delete_alias ) | ** DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} |
97
- * OneSignal::DefaultApi* | [ ** delete_player** ] ( docs/DefaultApi.md#delete_player ) | ** DELETE** /players/{player_id} | Delete a user record
98
- * OneSignal::DefaultApi* | [ ** delete_segments** ] ( docs/DefaultApi.md#delete_segments ) | ** DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segments
95
+ * OneSignal::DefaultApi* | [ ** delete_segment** ] ( docs/DefaultApi.md#delete_segment ) | ** DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segment
99
96
* OneSignal::DefaultApi* | [ ** delete_subscription** ] ( docs/DefaultApi.md#delete_subscription ) | ** DELETE** /apps/{app_id}/subscriptions/{subscription_id} |
100
97
* OneSignal::DefaultApi* | [ ** delete_user** ] ( docs/DefaultApi.md#delete_user ) | ** DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
101
- * OneSignal::DefaultApi* | [ ** end_live_activity** ] ( docs/DefaultApi.md#end_live_activity ) | ** DELETE** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity
102
98
* OneSignal::DefaultApi* | [ ** export_events** ] ( docs/DefaultApi.md#export_events ) | ** POST** /notifications/{notification_id}/export_events?app_id= ; {app_id} | Export CSV of Events
103
- * OneSignal::DefaultApi* | [ ** export_players** ] ( docs/DefaultApi.md#export_players ) | ** POST** /players/csv_export?app_id= ; {app_id} | Export CSV of Players
104
- * OneSignal::DefaultApi* | [ ** fetch_aliases** ] ( docs/DefaultApi.md#fetch_aliases ) | ** GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
105
- * OneSignal::DefaultApi* | [ ** fetch_user** ] ( docs/DefaultApi.md#fetch_user ) | ** GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
106
- * OneSignal::DefaultApi* | [ ** fetch_user_identity** ] ( docs/DefaultApi.md#fetch_user_identity ) | ** GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
99
+ * OneSignal::DefaultApi* | [ ** export_subscriptions** ] ( docs/DefaultApi.md#export_subscriptions ) | ** POST** /players/csv_export?app_id= ; {app_id} | Export CSV of Subscriptions
100
+ * OneSignal::DefaultApi* | [ ** get_aliases** ] ( docs/DefaultApi.md#get_aliases ) | ** GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
101
+ * OneSignal::DefaultApi* | [ ** get_aliases_by_subscription** ] ( docs/DefaultApi.md#get_aliases_by_subscription ) | ** GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
107
102
* OneSignal::DefaultApi* | [ ** get_app** ] ( docs/DefaultApi.md#get_app ) | ** GET** /apps/{app_id} | View an app
108
103
* OneSignal::DefaultApi* | [ ** get_apps** ] ( docs/DefaultApi.md#get_apps ) | ** GET** /apps | View apps
109
- * OneSignal::DefaultApi* | [ ** get_eligible_iams** ] ( docs/DefaultApi.md#get_eligible_iams ) | ** GET** /apps/{app_id}/subscriptions/{subscription_id}/iams |
110
104
* OneSignal::DefaultApi* | [ ** get_notification** ] ( docs/DefaultApi.md#get_notification ) | ** GET** /notifications/{notification_id} | View notification
111
105
* OneSignal::DefaultApi* | [ ** get_notification_history** ] ( docs/DefaultApi.md#get_notification_history ) | ** POST** /notifications/{notification_id}/history | Notification History
112
106
* OneSignal::DefaultApi* | [ ** get_notifications** ] ( docs/DefaultApi.md#get_notifications ) | ** GET** /notifications | View notifications
113
107
* OneSignal::DefaultApi* | [ ** get_outcomes** ] ( docs/DefaultApi.md#get_outcomes ) | ** GET** /apps/{app_id}/outcomes | View Outcomes
114
- * OneSignal::DefaultApi* | [ ** get_player** ] ( docs/DefaultApi.md#get_player ) | ** GET** /players/{player_id} | View device
115
- * OneSignal::DefaultApi* | [ ** get_players** ] ( docs/DefaultApi.md#get_players ) | ** GET** /players | View devices
116
- * OneSignal::DefaultApi* | [ ** identify_user_by_alias** ] ( docs/DefaultApi.md#identify_user_by_alias ) | ** PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
117
- * OneSignal::DefaultApi* | [ ** identify_user_by_subscription_id** ] ( docs/DefaultApi.md#identify_user_by_subscription_id ) | ** PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
108
+ * OneSignal::DefaultApi* | [ ** get_segments** ] ( docs/DefaultApi.md#get_segments ) | ** GET** /apps/{app_id}/segments | Get Segments
109
+ * OneSignal::DefaultApi* | [ ** get_user** ] ( docs/DefaultApi.md#get_user ) | ** GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
118
110
* OneSignal::DefaultApi* | [ ** transfer_subscription** ] ( docs/DefaultApi.md#transfer_subscription ) | ** PATCH** /apps/{app_id}/subscriptions/{subscription_id}/owner |
111
+ * OneSignal::DefaultApi* | [ ** unsubscribe_email_with_token** ] ( docs/DefaultApi.md#unsubscribe_email_with_token ) | ** POST** /apps/{app_id}/notifications/{notification_id}/unsubscribe | Unsubscribe with token
119
112
* OneSignal::DefaultApi* | [ ** update_app** ] ( docs/DefaultApi.md#update_app ) | ** PUT** /apps/{app_id} | Update an app
120
113
* OneSignal::DefaultApi* | [ ** update_live_activity** ] ( docs/DefaultApi.md#update_live_activity ) | ** POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push
121
- * OneSignal::DefaultApi* | [ ** update_player** ] ( docs/DefaultApi.md#update_player ) | ** PUT** /players/{player_id} | Edit device
122
- * OneSignal::DefaultApi* | [ ** update_player_tags** ] ( docs/DefaultApi.md#update_player_tags ) | ** PUT** /apps/{app_id}/users/{external_user_id} | Edit tags with external user id
123
114
* OneSignal::DefaultApi* | [ ** update_subscription** ] ( docs/DefaultApi.md#update_subscription ) | ** PATCH** /apps/{app_id}/subscriptions/{subscription_id} |
124
115
* OneSignal::DefaultApi* | [ ** update_user** ] ( docs/DefaultApi.md#update_user ) | ** PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
125
116
@@ -130,37 +121,25 @@ Class | Method | HTTP request | Description
130
121
- [ OneSignal::BasicNotification] ( docs/BasicNotification.md )
131
122
- [ OneSignal::BasicNotificationAllOf] ( docs/BasicNotificationAllOf.md )
132
123
- [ OneSignal::BasicNotificationAllOfAndroidBackgroundLayout] ( docs/BasicNotificationAllOfAndroidBackgroundLayout.md )
133
- - [ OneSignal::BeginLiveActivityRequest] ( docs/BeginLiveActivityRequest.md )
134
124
- [ OneSignal::Button] ( docs/Button.md )
135
- - [ OneSignal::CancelNotificationSuccessResponse] ( docs/CancelNotificationSuccessResponse.md )
136
125
- [ OneSignal::CreateNotificationSuccessResponse] ( docs/CreateNotificationSuccessResponse.md )
137
- - [ OneSignal::CreatePlayerSuccessResponse] ( docs/CreatePlayerSuccessResponse.md )
138
126
- [ OneSignal::CreateSegmentConflictResponse] ( docs/CreateSegmentConflictResponse.md )
139
127
- [ OneSignal::CreateSegmentSuccessResponse] ( docs/CreateSegmentSuccessResponse.md )
140
- - [ OneSignal::CreateSubscriptionRequestBody] ( docs/CreateSubscriptionRequestBody.md )
141
128
- [ OneSignal::CreateUserConflictResponse] ( docs/CreateUserConflictResponse.md )
142
129
- [ OneSignal::CreateUserConflictResponseErrorsInner] ( docs/CreateUserConflictResponseErrorsInner.md )
143
130
- [ OneSignal::CreateUserConflictResponseErrorsItemsMeta] ( docs/CreateUserConflictResponseErrorsItemsMeta.md )
144
- - [ OneSignal::DeletePlayerNotFoundResponse] ( docs/DeletePlayerNotFoundResponse.md )
145
- - [ OneSignal::DeletePlayerSuccessResponse] ( docs/DeletePlayerSuccessResponse.md )
146
- - [ OneSignal::DeleteSegmentNotFoundResponse] ( docs/DeleteSegmentNotFoundResponse.md )
147
- - [ OneSignal::DeleteSegmentSuccessResponse] ( docs/DeleteSegmentSuccessResponse.md )
148
131
- [ OneSignal::DeliveryData] ( docs/DeliveryData.md )
149
132
- [ OneSignal::ExportEventsSuccessResponse] ( docs/ExportEventsSuccessResponse.md )
150
- - [ OneSignal::ExportPlayersRequestBody ] ( docs/ExportPlayersRequestBody .md )
151
- - [ OneSignal::ExportPlayersSuccessResponse ] ( docs/ExportPlayersSuccessResponse .md )
133
+ - [ OneSignal::ExportSubscriptionsRequestBody ] ( docs/ExportSubscriptionsRequestBody .md )
134
+ - [ OneSignal::ExportSubscriptionsSuccessResponse ] ( docs/ExportSubscriptionsSuccessResponse .md )
152
135
- [ OneSignal::Filter] ( docs/Filter.md )
153
- - [ OneSignal::FilterExpressions ] ( docs/FilterExpressions .md )
136
+ - [ OneSignal::FilterExpression ] ( docs/FilterExpression .md )
154
137
- [ OneSignal::GenericError] ( docs/GenericError.md )
155
- - [ OneSignal::GenericErrorErrorsInner] ( docs/GenericErrorErrorsInner.md )
156
- - [ OneSignal::GetNotificationRequestBody] ( docs/GetNotificationRequestBody.md )
157
- - [ OneSignal::InlineResponse200] ( docs/InlineResponse200.md )
158
- - [ OneSignal::InlineResponse2003] ( docs/InlineResponse2003.md )
159
- - [ OneSignal::InlineResponse201] ( docs/InlineResponse201.md )
160
- - [ OneSignal::InlineResponse202] ( docs/InlineResponse202.md )
161
- - [ OneSignal::InvalidIdentifierError] ( docs/InvalidIdentifierError.md )
138
+ - [ OneSignal::GenericSuccessBoolResponse] ( docs/GenericSuccessBoolResponse.md )
139
+ - [ OneSignal::GetNotificationHistoryRequestBody] ( docs/GetNotificationHistoryRequestBody.md )
140
+ - [ OneSignal::GetSegmentsSuccessResponse] ( docs/GetSegmentsSuccessResponse.md )
141
+ - [ OneSignal::LanguageStringMap] ( docs/LanguageStringMap.md )
162
142
- [ OneSignal::Notification] ( docs/Notification.md )
163
- - [ OneSignal::Notification200Errors] ( docs/Notification200Errors.md )
164
143
- [ OneSignal::NotificationAllOf] ( docs/NotificationAllOf.md )
165
144
- [ OneSignal::NotificationHistorySuccessResponse] ( docs/NotificationHistorySuccessResponse.md )
166
145
- [ OneSignal::NotificationSlice] ( docs/NotificationSlice.md )
@@ -173,40 +152,34 @@ Class | Method | HTTP request | Description
173
152
- [ OneSignal::PlatformDeliveryData] ( docs/PlatformDeliveryData.md )
174
153
- [ OneSignal::PlatformDeliveryDataEmailAllOf] ( docs/PlatformDeliveryDataEmailAllOf.md )
175
154
- [ OneSignal::PlatformDeliveryDataSmsAllOf] ( docs/PlatformDeliveryDataSmsAllOf.md )
176
- - [ OneSignal::Player] ( docs/Player.md )
177
- - [ OneSignal::PlayerNotificationTarget] ( docs/PlayerNotificationTarget.md )
178
- - [ OneSignal::PlayerNotificationTargetIncludeAliases] ( docs/PlayerNotificationTargetIncludeAliases.md )
179
- - [ OneSignal::PlayerSlice] ( docs/PlayerSlice.md )
155
+ - [ OneSignal::PropertiesBody] ( docs/PropertiesBody.md )
180
156
- [ OneSignal::PropertiesDeltas] ( docs/PropertiesDeltas.md )
181
157
- [ OneSignal::PropertiesObject] ( docs/PropertiesObject.md )
182
158
- [ OneSignal::Purchase] ( docs/Purchase.md )
183
- - [ OneSignal::RateLimiterError ] ( docs/RateLimiterError .md )
159
+ - [ OneSignal::RateLimitError ] ( docs/RateLimitError .md )
184
160
- [ OneSignal::Segment] ( docs/Segment.md )
161
+ - [ OneSignal::SegmentData] ( docs/SegmentData.md )
185
162
- [ OneSignal::SegmentNotificationTarget] ( docs/SegmentNotificationTarget.md )
186
- - [ OneSignal::StringMap] ( docs/StringMap.md )
187
- - [ OneSignal::SubscriptionObject] ( docs/SubscriptionObject.md )
163
+ - [ OneSignal::Subscription] ( docs/Subscription.md )
164
+ - [ OneSignal::SubscriptionBody] ( docs/SubscriptionBody.md )
165
+ - [ OneSignal::SubscriptionNotificationTarget] ( docs/SubscriptionNotificationTarget.md )
188
166
- [ OneSignal::TransferSubscriptionRequestBody] ( docs/TransferSubscriptionRequestBody.md )
189
167
- [ OneSignal::UpdateLiveActivityRequest] ( docs/UpdateLiveActivityRequest.md )
190
168
- [ OneSignal::UpdateLiveActivitySuccessResponse] ( docs/UpdateLiveActivitySuccessResponse.md )
191
- - [ OneSignal::UpdatePlayerSuccessResponse] ( docs/UpdatePlayerSuccessResponse.md )
192
- - [ OneSignal::UpdatePlayerTagsRequestBody] ( docs/UpdatePlayerTagsRequestBody.md )
193
- - [ OneSignal::UpdatePlayerTagsSuccessResponse] ( docs/UpdatePlayerTagsSuccessResponse.md )
194
- - [ OneSignal::UpdateSubscriptionRequestBody] ( docs/UpdateSubscriptionRequestBody.md )
195
169
- [ OneSignal::UpdateUserRequest] ( docs/UpdateUserRequest.md )
196
170
- [ OneSignal::User] ( docs/User.md )
197
- - [ OneSignal::UserIdentityRequestBody] ( docs/UserIdentityRequestBody.md )
198
- - [ OneSignal::UserIdentityResponse] ( docs/UserIdentityResponse.md )
199
- - [ OneSignal::UserSubscriptionOptions] ( docs/UserSubscriptionOptions.md )
171
+ - [ OneSignal::UserIdentityBody] ( docs/UserIdentityBody.md )
172
+ - [ OneSignal::WebButton] ( docs/WebButton.md )
200
173
201
174
202
175
## Documentation for Authorization
203
176
204
177
205
- ### app_key
178
+ ### rest_api_key
206
179
207
180
- ** Type** : Bearer authentication
208
181
209
- ### user_key
182
+ ### user_auth_key
210
183
211
184
- ** Type** : Bearer authentication
212
185
0 commit comments