Skip to content

Commit a792708

Browse files
authored
Merge pull request #67 from OneSignal/user-api-updates
Add v5.1.0-beta1 package updates
2 parents 37eaec2 + edaac28 commit a792708

File tree

74 files changed

+107
-107
lines changed

Some content is hidden

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

74 files changed

+107
-107
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

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

5-
- API version: 5.0.1
6-
- SDK version: 5.0.0-beta1
5+
- API version: 5.1.0
6+
- SDK version: 5.1.0-beta1
77
- Build package: org.openapitools.codegen.languages.CSharpNetCoreClientCodegen
88
For more information, please visit [https://onesignal.com](https://onesignal.com)
99

@@ -69,13 +69,13 @@ namespace Example
6969
{
7070
public static void Main()
7171
{
72-
// Configure configuration with user_key Bearer token for authorization to access endpoints
73-
// that require the OneSignal User Auth Key.
74-
var userConfig = new Configuration();
75-
userConfig.BasePath = "https://api.onesignal.com";
76-
userConfig.AccessToken = "USER_AUTH_KEY";
72+
// Configure configuration with organization_api_key Bearer token for authorization to access endpoints
73+
// that require the OneSignal Organization API Key.
74+
var orgConfig = new Configuration();
75+
orgConfig.BasePath = "https://api.onesignal.com";
76+
orgConfig.AccessToken = "YOUR_ORGANIZATION_API_KEY"; // Organization key is only required for creating new apps and other top-level endpoints
7777
78-
var userInstance = new DefaultApi(userConfig);
78+
var userInstance = new DefaultApi(orgConfig);
7979

8080
try
8181
{
@@ -92,11 +92,11 @@ namespace Example
9292
}
9393

9494

95-
// Configure configuration with app_key Bearer token for authorization to access endpoints
95+
// Configure configuration with rest_api_key Bearer token for authorization to access endpoints
9696
// that require the OneSignal App REST API Key.
9797
var appConfig = new Configuration();
9898
appConfig.BasePath = "https://api.onesignal.com";
99-
appConfig.AccessToken = "REST_API_KEY";
99+
appConfig.AccessToken = "YOUR_REST_API_KEY"; // App REST API key required for most endpoints
100100
101101
var appInstance = new DefaultApi(appConfig);
102102

@@ -219,13 +219,13 @@ Class | Method | HTTP request | Description
219219
<a name="documentation-for-authorization"></a>
220220
## Documentation for Authorization
221221

222-
<a name="rest_api_key"></a>
223-
### rest_api_key
222+
<a name="organization_api_key"></a>
223+
### organization_api_key
224224

225225
- **Type**: Bearer Authentication
226226

227-
<a name="user_auth_key"></a>
228-
### user_auth_key
227+
<a name="rest_api_key"></a>
228+
### rest_api_key
229229

230230
- **Type**: Bearer Authentication
231231

docs/DefaultApi.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ namespace Example
303303
{
304304
Configuration config = new Configuration();
305305
config.BasePath = "https://api.onesignal.com";
306-
// Configure Bearer token for authorization: user_auth_key
306+
// Configure Bearer token for authorization: organization_api_key
307307
config.AccessToken = "YOUR_BEARER_TOKEN";
308308

309309
var apiInstance = new DefaultApi(config);
@@ -338,7 +338,7 @@ Name | Type | Description | Notes
338338

339339
### Authorization
340340

341-
[user_auth_key](../README.md#user_auth_key)
341+
[organization_api_key](../README.md#organization_api_key)
342342

343343
### HTTP request headers
344344

@@ -1331,7 +1331,7 @@ namespace Example
13311331
{
13321332
Configuration config = new Configuration();
13331333
config.BasePath = "https://api.onesignal.com";
1334-
// Configure Bearer token for authorization: user_auth_key
1334+
// Configure Bearer token for authorization: organization_api_key
13351335
config.AccessToken = "YOUR_BEARER_TOKEN";
13361336

13371337
var apiInstance = new DefaultApi(config);
@@ -1366,7 +1366,7 @@ Name | Type | Description | Notes
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

@@ -1407,7 +1407,7 @@ namespace Example
14071407
{
14081408
Configuration config = new Configuration();
14091409
config.BasePath = "https://api.onesignal.com";
1410-
// Configure Bearer token for authorization: user_auth_key
1410+
// Configure Bearer token for authorization: organization_api_key
14111411
config.AccessToken = "YOUR_BEARER_TOKEN";
14121412

14131413
var apiInstance = new DefaultApi(config);
@@ -1438,7 +1438,7 @@ This endpoint does not need any parameter.
14381438

14391439
### Authorization
14401440

1441-
[user_auth_key](../README.md#user_auth_key)
1441+
[organization_api_key](../README.md#organization_api_key)
14421442

14431443
### HTTP request headers
14441444

@@ -2126,7 +2126,7 @@ namespace Example
21262126
{
21272127
Configuration config = new Configuration();
21282128
config.BasePath = "https://api.onesignal.com";
2129-
// Configure Bearer token for authorization: user_auth_key
2129+
// Configure Bearer token for authorization: organization_api_key
21302130
config.AccessToken = "YOUR_BEARER_TOKEN";
21312131

21322132
var apiInstance = new DefaultApi(config);
@@ -2163,7 +2163,7 @@ Name | Type | Description | Notes
21632163

21642164
### Authorization
21652165

2166-
[user_auth_key](../README.md#user_auth_key)
2166+
[organization_api_key](../README.md#organization_api_key)
21672167

21682168
### HTTP request headers
21692169

src/OneSignalApi/Api/DefaultApi.cs

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
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://github.com/openapitools/openapi-generator.git
99
*/
@@ -2424,7 +2424,7 @@ public OneSignalApi.Client.ApiResponse<App> CreateAppWithHttpInfo(App app, int o
24242424
localVarRequestOptions.Operation = "DefaultApi.CreateApp";
24252425
localVarRequestOptions.OperationIndex = operationIndex;
24262426

2427-
// authentication (user_auth_key) required
2427+
// authentication (organization_api_key) required
24282428
// bearer authentication required
24292429
if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization"))
24302430
{
@@ -2504,7 +2504,7 @@ public OneSignalApi.Client.ApiResponse<App> CreateAppWithHttpInfo(App app, int o
25042504
localVarRequestOptions.Operation = "DefaultApi.CreateApp";
25052505
localVarRequestOptions.OperationIndex = operationIndex;
25062506

2507-
// authentication (user_auth_key) required
2507+
// authentication (organization_api_key) required
25082508
// bearer authentication required
25092509
if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization"))
25102510
{
@@ -4741,7 +4741,7 @@ public OneSignalApi.Client.ApiResponse<App> GetAppWithHttpInfo(string appId, int
47414741
localVarRequestOptions.Operation = "DefaultApi.GetApp";
47424742
localVarRequestOptions.OperationIndex = operationIndex;
47434743

4744-
// authentication (user_auth_key) required
4744+
// authentication (organization_api_key) required
47454745
// bearer authentication required
47464746
if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization"))
47474747
{
@@ -4820,7 +4820,7 @@ public OneSignalApi.Client.ApiResponse<App> GetAppWithHttpInfo(string appId, int
48204820
localVarRequestOptions.Operation = "DefaultApi.GetApp";
48214821
localVarRequestOptions.OperationIndex = operationIndex;
48224822

4823-
// authentication (user_auth_key) required
4823+
// authentication (organization_api_key) required
48244824
// bearer authentication required
48254825
if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization"))
48264826
{
@@ -4888,7 +4888,7 @@ public OneSignalApi.Client.ApiResponse<List<App>> GetAppsWithHttpInfo(int operat
48884888
localVarRequestOptions.Operation = "DefaultApi.GetApps";
48894889
localVarRequestOptions.OperationIndex = operationIndex;
48904890

4891-
// authentication (user_auth_key) required
4891+
// authentication (organization_api_key) required
48924892
// bearer authentication required
48934893
if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization"))
48944894
{
@@ -4958,7 +4958,7 @@ public OneSignalApi.Client.ApiResponse<List<App>> GetAppsWithHttpInfo(int operat
49584958
localVarRequestOptions.Operation = "DefaultApi.GetApps";
49594959
localVarRequestOptions.OperationIndex = operationIndex;
49604960

4961-
// authentication (user_auth_key) required
4961+
// authentication (organization_api_key) required
49624962
// bearer authentication required
49634963
if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization"))
49644964
{
@@ -6567,7 +6567,7 @@ public OneSignalApi.Client.ApiResponse<App> UpdateAppWithHttpInfo(string appId,
65676567
localVarRequestOptions.Operation = "DefaultApi.UpdateApp";
65686568
localVarRequestOptions.OperationIndex = operationIndex;
65696569

6570-
// authentication (user_auth_key) required
6570+
// authentication (organization_api_key) required
65716571
// bearer authentication required
65726572
if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization"))
65736573
{
@@ -6656,7 +6656,7 @@ public OneSignalApi.Client.ApiResponse<App> UpdateAppWithHttpInfo(string appId,
66566656
localVarRequestOptions.Operation = "DefaultApi.UpdateApp";
66576657
localVarRequestOptions.OperationIndex = operationIndex;
66586658

6659-
// authentication (user_auth_key) required
6659+
// authentication (organization_api_key) required
66606660
// bearer authentication required
66616661
if (!string.IsNullOrEmpty(this.Configuration.AccessToken) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization"))
66626662
{

src/OneSignalApi/Client/ApiClient.cs

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://github.com/openapitools/openapi-generator.git
99
*/
@@ -304,7 +304,7 @@ private RestRequest NewRequest(
304304
}
305305

306306
// Always add the One Signal telemetry to the request.
307-
request.AddHeader("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-dotnet, version=5.0.0-beta1");
307+
request.AddHeader("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-dotnet, version=5.1.0-beta1");
308308

309309
if (configuration.DefaultHeaders != null)
310310
{

src/OneSignalApi/Client/ApiException.cs

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://github.com/openapitools/openapi-generator.git
99
*/

src/OneSignalApi/Client/ApiResponse.cs

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://github.com/openapitools/openapi-generator.git
99
*/

src/OneSignalApi/Client/ClientUtils.cs

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://github.com/openapitools/openapi-generator.git
99
*/

src/OneSignalApi/Client/Configuration.cs

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://github.com/openapitools/openapi-generator.git
99
*/
@@ -32,7 +32,7 @@ public class Configuration : IReadableConfiguration
3232
/// Version of the package.
3333
/// </summary>
3434
/// <value>Version of the package.</value>
35-
public const string Version = "5.0.0-beta1";
35+
public const string Version = "5.1.0-beta1";
3636

3737
/// <summary>
3838
/// Identifier for ISO 8601 DateTime Format
@@ -109,7 +109,7 @@ public class Configuration : IReadableConfiguration
109109
public Configuration()
110110
{
111111
Proxy = null;
112-
UserAgent = "OpenAPI-Generator/5.0.0-beta1/csharp";
112+
UserAgent = "OpenAPI-Generator/5.1.0-beta1/csharp";
113113
BasePath = "https://api.onesignal.com";
114114
DefaultHeaders = new ConcurrentDictionary<string, string>();
115115
ApiKey = new ConcurrentDictionary<string, string>();
@@ -516,8 +516,8 @@ public static string ToDebugReport()
516516
string report = "C# SDK (OneSignalApi) Debug Report:\n";
517517
report += " OS: " + System.Environment.OSVersion + "\n";
518518
report += " .NET Framework Version: " + System.Environment.Version + "\n";
519-
report += " Version of the API: 5.0.1\n";
520-
report += " SDK Package Version: 5.0.0-beta1\n";
519+
report += " Version of the API: 5.1.0\n";
520+
report += " SDK Package Version: 5.1.0-beta1\n";
521521

522522
return report;
523523
}

src/OneSignalApi/Client/ExceptionFactory.cs

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://github.com/openapitools/openapi-generator.git
99
*/

src/OneSignalApi/Client/GlobalConfiguration.cs

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://github.com/openapitools/openapi-generator.git
99
*/

0 commit comments

Comments
 (0)