Skip to content

Commit 9c9348d

Browse files
authored
Merge pull request #50 from OneSignal/user-api-updates
Add v5.1.0-beta1 package updates
2 parents dbb7429 + 30d6afc commit 9c9348d

File tree

121 files changed

+149
-150
lines changed

Some content is hidden

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

121 files changed

+149
-150
lines changed

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
1818

19-
- API version: 5.0.1
20-
- Package version: 5.0.0-beta1
19+
- API version: 5.1.0
20+
- Package version: 5.1.0-beta1
2121
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
2222

2323
## Requirements.
@@ -62,12 +62,11 @@ import onesignal
6262
from onesignal.api import default_api
6363

6464
# See configuration.py for a list of all supported configuration parameters.
65-
# Some of the OneSignal endpoints require USER_KEY bearer token for authorization as long as others require APP_KEY
66-
# (also knows as REST_API_KEY). We recommend adding both of them in the configuration page so that you will not need
67-
# to figure it yourself.
65+
# Some of the OneSignal endpoints require ORGANIZATION_API_KEY token for authorization, while others require REST_API_KEY.
66+
# We recommend adding both of them in the configuration page so that you will not need to figure it out yourself.
6867
configuration = onesignal.Configuration(
69-
app_key = "YOUR_APP_KEY",
70-
user_key = "YOUR_USER_KEY"
68+
rest_api_key = "YOUR_REST_API_KEY", # App REST API key required for most endpoints
69+
organization_api_key = "YOUR_ORGANIZATION_KEY" # Organization key is only required for creating new apps and other top-level endpoints
7170
)
7271

7372

docs/DefaultApi.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ Creates a new OneSignal app
263263

264264
### Example
265265

266-
* Bearer Authentication (user_auth_key):
266+
* Bearer Authentication (organization_api_key):
267267

268268
```python
269269
import onesignal
@@ -323,7 +323,7 @@ Name | Type | Description | Notes
323323

324324
### Authorization
325325

326-
[user_auth_key](../README.md#user_auth_key)
326+
[organization_api_key](../README.md#organization_api_key)
327327

328328
### HTTP request headers
329329

@@ -1267,7 +1267,7 @@ View the details of a single OneSignal app
12671267

12681268
### Example
12691269

1270-
* Bearer Authentication (user_auth_key):
1270+
* Bearer Authentication (organization_api_key):
12711271

12721272
```python
12731273
import onesignal
@@ -1305,7 +1305,7 @@ Name | Type | Description | Notes
13051305

13061306
### Authorization
13071307

1308-
[user_auth_key](../README.md#user_auth_key)
1308+
[organization_api_key](../README.md#organization_api_key)
13091309

13101310
### HTTP request headers
13111311

@@ -1332,7 +1332,7 @@ View the details of all of your current OneSignal apps
13321332

13331333
### Example
13341334

1335-
* Bearer Authentication (user_auth_key):
1335+
* Bearer Authentication (organization_api_key):
13361336

13371337
```python
13381338
import onesignal
@@ -1366,7 +1366,7 @@ This endpoint does not need any parameter.
13661366

13671367
### Authorization
13681368

1369-
[user_auth_key](../README.md#user_auth_key)
1369+
[organization_api_key](../README.md#organization_api_key)
13701370

13711371
### HTTP request headers
13721372

@@ -1989,7 +1989,7 @@ Updates the name or configuration settings of an existing OneSignal app
19891989

19901990
### Example
19911991

1992-
* Bearer Authentication (user_auth_key):
1992+
* Bearer Authentication (organization_api_key):
19931993

19941994
```python
19951995
import onesignal
@@ -2051,7 +2051,7 @@ Name | Type | Description | Notes
20512051

20522052
### Authorization
20532053

2054-
[user_auth_key](../README.md#user_auth_key)
2054+
[organization_api_key](../README.md#organization_api_key)
20552055

20562056
### HTTP request headers
20572057

onesignal/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
66
A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501
77
8-
The version of the OpenAPI document: 5.0.1
8+
The version of the OpenAPI document: 5.1.0
99
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

1313

14-
__version__ = "5.0.0-beta1"
14+
__version__ = "5.1.0-beta1"
1515

1616
# import ApiClient
1717
from onesignal.api_client import ApiClient

onesignal/api/default_api.py

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 # noqa: E501
55
6-
The version of the OpenAPI document: 5.0.1
6+
The version of the OpenAPI document: 5.1.0
77
88
Generated by: https://openapi-generator.tech
99
"""
@@ -258,7 +258,7 @@ def __init__(self, api_client=None):
258258
settings={
259259
'response_type': (App,),
260260
'auth': [
261-
'user_auth_key'
261+
'organization_api_key'
262262
],
263263
'endpoint_path': '/apps',
264264
'operation_id': 'create_app',
@@ -1027,7 +1027,7 @@ def __init__(self, api_client=None):
10271027
settings={
10281028
'response_type': (App,),
10291029
'auth': [
1030-
'user_auth_key'
1030+
'organization_api_key'
10311031
],
10321032
'endpoint_path': '/apps/{app_id}',
10331033
'operation_id': 'get_app',
@@ -1078,7 +1078,7 @@ def __init__(self, api_client=None):
10781078
settings={
10791079
'response_type': (Apps,),
10801080
'auth': [
1081-
'user_auth_key'
1081+
'organization_api_key'
10821082
],
10831083
'endpoint_path': '/apps',
10841084
'operation_id': 'get_apps',
@@ -1638,7 +1638,7 @@ def __init__(self, api_client=None):
16381638
settings={
16391639
'response_type': (App,),
16401640
'auth': [
1641-
'user_auth_key'
1641+
'organization_api_key'
16421642
],
16431643
'endpoint_path': '/apps/{app_id}',
16441644
'operation_id': 'update_app',

onesignal/api_client.py

Lines changed: 3 additions & 3 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 # noqa: E501
55
6-
The version of the OpenAPI document: 5.0.1
6+
The version of the OpenAPI document: 5.1.0
77
88
Generated by: https://openapi-generator.tech
99
"""
@@ -77,7 +77,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7777
self.default_headers[header_name] = header_value
7878
self.cookie = cookie
7979
# Set default User-Agent.
80-
self.user_agent = 'OpenAPI-Generator/5.0.0-beta1/python'
80+
self.user_agent = 'OpenAPI-Generator/5.1.0-beta1/python'
8181

8282
def __enter__(self):
8383
return self
@@ -142,7 +142,7 @@ def __call_api(
142142
# header parameters
143143
header_params = header_params or {}
144144
header_params.update(self.default_headers)
145-
header_params['OS-Usage-Data'] = "kind=sdk, sdk-name=onesignal-python, version=5.0.0-beta1"
145+
header_params['OS-Usage-Data'] = "kind=sdk, sdk-name=onesignal-python, version=5.1.0-beta1"
146146
if self.cookie:
147147
header_params['Cookie'] = self.cookie
148148
if header_params:

onesignal/configuration.py

Lines changed: 9 additions & 9 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 # noqa: E501
55
6-
The version of the OpenAPI document: 5.0.1
6+
The version of the OpenAPI document: 5.1.0
77
88
Generated by: https://openapi-generator.tech
99
"""
@@ -373,20 +373,20 @@ def auth_settings(self):
373373
:return: The Auth Settings information dict.
374374
"""
375375
auth = {}
376-
if self.rest_api_key is not None:
377-
auth['rest_api_key'] = {
376+
if self.organization_api_key is not None:
377+
auth['organization_api_key'] = {
378378
'type': 'bearer',
379379
'in': 'header',
380380
'key': 'Authorization',
381-
'value': 'Key ' + self.rest_api_key
381+
'value': 'Key ' + self.organization_api_key
382382
}
383383

384-
if self.user_auth_key is not None:
385-
auth['user_auth_key'] = {
384+
if self.rest_api_key is not None:
385+
auth['rest_api_key'] = {
386386
'type': 'bearer',
387387
'in': 'header',
388388
'key': 'Authorization',
389-
'value': 'Key ' + self.user_auth_key
389+
'value': 'Key ' + self.rest_api_key
390390
}
391391

392392
return auth
@@ -399,8 +399,8 @@ def to_debug_report(self):
399399
return "Python SDK Debug Report:\n"\
400400
"OS: {env}\n"\
401401
"Python Version: {pyversion}\n"\
402-
"Version of the API: 5.0.1\n"\
403-
"SDK Package Version: 5.0.0-beta1".\
402+
"Version of the API: 5.1.0\n"\
403+
"SDK Package Version: 5.1.0-beta1".\
404404
format(env=sys.platform, pyversion=sys.version)
405405

406406
def get_host_settings(self):

onesignal/exceptions.py

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 # noqa: E501
55
6-
The version of the OpenAPI document: 5.0.1
6+
The version of the OpenAPI document: 5.1.0
77
88
Generated by: https://openapi-generator.tech
99
"""

onesignal/model/app.py

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 # noqa: E501
55
6-
The version of the OpenAPI document: 5.0.1
6+
The version of the OpenAPI document: 5.1.0
77
88
Generated by: https://openapi-generator.tech
99
"""

onesignal/model/apps.py

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 # noqa: E501
55
6-
The version of the OpenAPI document: 5.0.1
6+
The version of the OpenAPI document: 5.1.0
77
88
Generated by: https://openapi-generator.tech
99
"""

onesignal/model/basic_notification.py

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 # noqa: E501
55
6-
The version of the OpenAPI document: 5.0.1
6+
The version of the OpenAPI document: 5.1.0
77
88
Generated by: https://openapi-generator.tech
99
"""

0 commit comments

Comments
 (0)