Skip to content

Commit 6d42c7b

Browse files
authored
Merge pull request #50 from OneSignal/user-api-updates
Add v5.1.0-beta1 package updates
2 parents c30d74d + 2a8c671 commit 6d42c7b

File tree

119 files changed

+149
-147
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+149
-147
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ A powerful way to send personalized messages at scale and build effective custom
66

77
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
88

9-
- API version: 5.0.1
10-
- Package version: 5.0.0-beta1
9+
- API version: 5.1.0
10+
- Package version: 5.1.0-beta1
1111
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
1212
For more information, please visit [https://onesignal.com](https://onesignal.com)
1313

@@ -24,16 +24,16 @@ gem build onesignal.gemspec
2424
Then either install the gem locally:
2525

2626
```shell
27-
gem install ./onesignal-5.0.0-beta1.gem
27+
gem install ./onesignal-5.1.0-beta1.gem
2828
```
2929

30-
(for development, run `gem install --dev ./onesignal-5.0.0-beta1.gem` to install the development dependencies)
30+
(for development, run `gem install --dev ./onesignal-5.1.0-beta1.gem` to install the development dependencies)
3131

3232
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
3333

3434
Finally add this to the Gemfile:
3535

36-
gem 'onesignal', '~> 5.0.0-beta1'
36+
gem 'onesignal', '~> 5.1.0-beta1'
3737

3838
### Install from Git
3939

@@ -59,8 +59,10 @@ require 'onesignal'
5959

6060
# Setup authorization
6161
OneSignal.configure do |config|
62+
# Configure Bearer authorization: organization_api_key
63+
config.organization_api_key = 'ORGANIZATION_API_KEY' # Organization key is only required for creating new apps and other top-level endpoints
6264
# Configure Bearer authorization: rest_api_key
63-
config.access_token = 'YOUR_BEARER_TOKEN'
65+
config.rest_api_key = 'REST_API_KEY' # App REST API key required for most endpoints
6466
end
6567

6668
api_instance = OneSignal::DefaultApi.new
@@ -175,11 +177,11 @@ Class | Method | HTTP request | Description
175177
## Documentation for Authorization
176178

177179

178-
### rest_api_key
180+
### organization_api_key
179181

180182
- **Type**: Bearer authentication
181183

182-
### user_auth_key
184+
### rest_api_key
183185

184186
- **Type**: Bearer authentication
185187

docs/DefaultApi.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ Creates a new OneSignal app
269269
require 'onesignal'
270270
# setup authorization
271271
OneSignal.configure do |config|
272-
# Configure Bearer authorization: user_auth_key
273-
config.user_auth_key = 'YOUR_BEARER_TOKEN'
272+
# Configure Bearer authorization: organization_api_key
273+
config.organization_api_key = 'YOUR_BEARER_TOKEN'
274274

275275
end
276276

@@ -316,7 +316,7 @@ end
316316

317317
### Authorization
318318

319-
[user_auth_key](../README.md#user_auth_key)
319+
[organization_api_key](../README.md#organization_api_key)
320320

321321
### HTTP request headers
322322

@@ -1202,8 +1202,8 @@ View the details of a single OneSignal app
12021202
require 'onesignal'
12031203
# setup authorization
12041204
OneSignal.configure do |config|
1205-
# Configure Bearer authorization: user_auth_key
1206-
config.user_auth_key = 'YOUR_BEARER_TOKEN'
1205+
# Configure Bearer authorization: organization_api_key
1206+
config.organization_api_key = 'YOUR_BEARER_TOKEN'
12071207

12081208
end
12091209

@@ -1249,7 +1249,7 @@ end
12491249

12501250
### Authorization
12511251

1252-
[user_auth_key](../README.md#user_auth_key)
1252+
[organization_api_key](../README.md#organization_api_key)
12531253

12541254
### HTTP request headers
12551255

@@ -1271,8 +1271,8 @@ View the details of all of your current OneSignal apps
12711271
require 'onesignal'
12721272
# setup authorization
12731273
OneSignal.configure do |config|
1274-
# Configure Bearer authorization: user_auth_key
1275-
config.user_auth_key = 'YOUR_BEARER_TOKEN'
1274+
# Configure Bearer authorization: organization_api_key
1275+
config.organization_api_key = 'YOUR_BEARER_TOKEN'
12761276

12771277
end
12781278

@@ -1315,7 +1315,7 @@ This endpoint does not need any parameter.
13151315

13161316
### Authorization
13171317

1318-
[user_auth_key](../README.md#user_auth_key)
1318+
[organization_api_key](../README.md#organization_api_key)
13191319

13201320
### HTTP request headers
13211321

@@ -1931,8 +1931,8 @@ Updates the name or configuration settings of an existing OneSignal app
19311931
require 'onesignal'
19321932
# setup authorization
19331933
OneSignal.configure do |config|
1934-
# Configure Bearer authorization: user_auth_key
1935-
config.user_auth_key = 'YOUR_BEARER_TOKEN'
1934+
# Configure Bearer authorization: organization_api_key
1935+
config.organization_api_key = 'YOUR_BEARER_TOKEN'
19361936

19371937
end
19381938

@@ -1980,7 +1980,7 @@ end
19801980

19811981
### Authorization
19821982

1983-
[user_auth_key](../README.md#user_auth_key)
1983+
[organization_api_key](../README.md#organization_api_key)
19841984

19851985
### HTTP request headers
19861986

lib/onesignal.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
55
6-
The version of the OpenAPI document: 5.0.1
6+
The version of the OpenAPI document: 5.1.0
77
Contact: devrel@onesignal.com
88
Generated by: https://openapi-generator.tech
99
OpenAPI Generator version: 6.0.0-SNAPSHOT

lib/onesignal/api/default_api.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
55
6-
The version of the OpenAPI document: 5.0.1
6+
The version of the OpenAPI document: 5.1.0
77
Contact: devrel@onesignal.com
88
Generated by: https://openapi-generator.tech
99
OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -300,7 +300,7 @@ def create_app_with_http_info(app, opts = {})
300300
return_type = opts[:debug_return_type] || 'App'
301301

302302
# auth_names
303-
auth_names = opts[:debug_auth_names] || ['user_auth_key']
303+
auth_names = opts[:debug_auth_names] || ['organization_api_key']
304304

305305
new_options = opts.merge(
306306
:operation => :"DefaultApi.create_app",
@@ -1225,7 +1225,7 @@ def get_app_with_http_info(app_id, opts = {})
12251225
return_type = opts[:debug_return_type] || 'App'
12261226

12271227
# auth_names
1228-
auth_names = opts[:debug_auth_names] || ['user_auth_key']
1228+
auth_names = opts[:debug_auth_names] || ['organization_api_key']
12291229

12301230
new_options = opts.merge(
12311231
:operation => :"DefaultApi.get_app",
@@ -1282,7 +1282,7 @@ def get_apps_with_http_info(opts = {})
12821282
return_type = opts[:debug_return_type] || 'Array<App>'
12831283

12841284
# auth_names
1285-
auth_names = opts[:debug_auth_names] || ['user_auth_key']
1285+
auth_names = opts[:debug_auth_names] || ['organization_api_key']
12861286

12871287
new_options = opts.merge(
12881288
:operation => :"DefaultApi.get_apps",
@@ -1955,7 +1955,7 @@ def update_app_with_http_info(app_id, app, opts = {})
19551955
return_type = opts[:debug_return_type] || 'App'
19561956

19571957
# auth_names
1958-
auth_names = opts[:debug_auth_names] || ['user_auth_key']
1958+
auth_names = opts[:debug_auth_names] || ['organization_api_key']
19591959

19601960
new_options = opts.merge(
19611961
:operation => :"DefaultApi.update_app",

lib/onesignal/api_client.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
55
6-
The version of the OpenAPI document: 5.0.1
6+
The version of the OpenAPI document: 5.1.0
77
Contact: devrel@onesignal.com
88
Generated by: https://openapi-generator.tech
99
OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -90,7 +90,7 @@ def build_request(http_method, path, opts = {})
9090
url = build_request_url(path, opts)
9191
http_method = http_method.to_sym.downcase
9292

93-
opts[:header_params]['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-ruby, version=5.0.0-beta1'
93+
opts[:header_params]['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-ruby, version=5.1.0-beta1'
9494
header_params = @default_headers.merge(opts[:header_params] || {})
9595
query_params = opts[:query_params] || {}
9696
form_params = opts[:form_params] || {}

lib/onesignal/api_error.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
55
6-
The version of the OpenAPI document: 5.0.1
6+
The version of the OpenAPI document: 5.1.0
77
Contact: devrel@onesignal.com
88
Generated by: https://openapi-generator.tech
99
OpenAPI Generator version: 6.0.0-SNAPSHOT

lib/onesignal/configuration.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
55
6-
The version of the OpenAPI document: 5.0.1
6+
The version of the OpenAPI document: 5.1.0
77
Contact: devrel@onesignal.com
88
Generated by: https://openapi-generator.tech
99
OpenAPI Generator version: 6.0.0-SNAPSHOT
@@ -175,19 +175,19 @@ def base_url(operation = nil)
175175
# Returns Auth Settings hash for api client.
176176
def auth_settings
177177
{
178-
'rest_api_key' =>
178+
'organization_api_key' =>
179179
{
180180
type: 'bearer',
181181
in: 'header',
182182
key: 'Authorization',
183-
value: "Key token=\"#{ rest_api_key }\""
183+
value: "Key \"#{ organization_api_key }\""
184184
},
185-
'user_auth_key' =>
185+
'rest_api_key' =>
186186
{
187187
type: 'bearer',
188188
in: 'header',
189189
key: 'Authorization',
190-
value: "Key token=\"#{ user_auth_key }\""
190+
value: "Key \"#{ rest_api_key }\""
191191
},
192192
}
193193
end

lib/onesignal/models/app.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
55
6-
The version of the OpenAPI document: 5.0.1
6+
The version of the OpenAPI document: 5.1.0
77
Contact: devrel@onesignal.com
88
Generated by: https://openapi-generator.tech
99
OpenAPI Generator version: 6.0.0-SNAPSHOT

lib/onesignal/models/basic_notification.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
55
6-
The version of the OpenAPI document: 5.0.1
6+
The version of the OpenAPI document: 5.1.0
77
Contact: devrel@onesignal.com
88
Generated by: https://openapi-generator.tech
99
OpenAPI Generator version: 6.0.0-SNAPSHOT

lib/onesignal/models/basic_notification_all_of.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
44
#A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
55
6-
The version of the OpenAPI document: 5.0.1
6+
The version of the OpenAPI document: 5.1.0
77
Contact: devrel@onesignal.com
88
Generated by: https://openapi-generator.tech
99
OpenAPI Generator version: 6.0.0-SNAPSHOT

0 commit comments

Comments
 (0)