Skip to content

Commit 88d5555

Browse files
authored
Merge pull request #52 from OneSignal/user-api-updates
Add v5.1.0-beta1 package updates
2 parents a8baa16 + c819297 commit 88d5555

File tree

76 files changed

+205
-205
lines changed

Some content is hidden

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

76 files changed

+205
-205
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# onesignal-java-client
22

33
OneSignal
4-
- API version: 5.0.1
5-
- Build date: 2025-05-13T23:45:41.211Z[Etc/UTC]
4+
- API version: 5.1.0
5+
- Build date: 2025-06-05T20:14:26.949Z[Etc/UTC]
66

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

@@ -41,7 +41,7 @@ Add this dependency to your project's POM:
4141
<dependency>
4242
<groupId>org.openapitools</groupId>
4343
<artifactId>onesignal-java-client</artifactId>
44-
<version>5.0.1</version>
44+
<version>5.1.0</version>
4545
<scope>compile</scope>
4646
</dependency>
4747
```
@@ -57,7 +57,7 @@ Add this dependency to your project's build file:
5757
}
5858
5959
dependencies {
60-
implementation "org.openapitools:onesignal-java-client:5.0.1"
60+
implementation "org.openapitools:onesignal-java-client:5.1.0"
6161
}
6262
```
6363

@@ -71,7 +71,7 @@ mvn clean package
7171

7272
Then manually install the following JARs:
7373

74-
* `target/onesignal-java-client-5.0.1.jar`
74+
* `target/onesignal-java-client-5.1.0.jar`
7575
* `target/lib/*.jar`
7676

7777
## Getting Started
@@ -90,8 +90,8 @@ import com.onesignal.client.api.DefaultApi;
9090

9191
public class Example {
9292
private static final String appId = "YOUR_APP_ID";
93-
private static final String appKeyToken = "YOUR_APP_KEY";
94-
private static final String userKeyToken = "YOUR_USER_TOKEN";
93+
private static final String restApiKey = "YOUR_REST_API_KEY"; // App REST API key required for most endpoints
94+
private static final String organizationApiKey = "YOUR_ORGANIZATION_API_KEY"; // Organization key is only required for creating new apps and other top-level endpoints
9595

9696
private static Notification createNotification() {
9797
Notification notification = new Notification();
@@ -109,10 +109,10 @@ public class Example {
109109
public static void main(String[] args) {
110110
// Setting up the client
111111
ApiClient defaultClient = Configuration.getDefaultApiClient();
112-
HttpBearerAuth appKey = (HttpBearerAuth) defaultClient.getAuthentication("app_key");
113-
appKey.setBearerToken(appKeyToken);
114-
HttpBearerAuth userKey = (HttpBearerAuth) defaultClient.getAuthentication("user_key");
115-
userKey.setBearerToken(userKeyToken);
112+
HttpBearerAuth restApiAuth = (HttpBearerAuth) defaultClient.getAuthentication("rest_api_key");
113+
restApiAuth.setBearerToken(restApiKey);
114+
HttpBearerAuth organizationApiAuth = (HttpBearerAuth) defaultClient.getAuthentication("organization_api_key");
115+
organizationApiAuth.setBearerToken(organizationApiKey);
116116
api = new DefaultApi(defaultClient);
117117

118118
// Setting up the notification
@@ -226,11 +226,11 @@ Class | Method | HTTP request | Description
226226
## Documentation for Authorization
227227

228228
Authentication schemes defined for the API:
229-
### rest_api_key
229+
### organization_api_key
230230

231231
- **Type**: HTTP basic authentication
232232

233-
### user_auth_key
233+
### rest_api_key
234234

235235
- **Type**: HTTP basic authentication
236236

api/openapi.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ info:
88
customer engagement strategies. Learn more at onesignal.com
99
termsOfService: https://onesignal.com/tos
1010
title: OneSignal
11-
version: 5.0.1
11+
version: 5.1.0
1212
servers:
1313
- url: https://api.onesignal.com
1414
paths:
@@ -326,7 +326,7 @@ paths:
326326
$ref: '#/components/schemas/RateLimitError'
327327
description: Rate Limit Exceeded
328328
security:
329-
- user_auth_key: []
329+
- organization_api_key: []
330330
summary: View apps
331331
x-accepts: application/json
332332
post:
@@ -358,7 +358,7 @@ paths:
358358
$ref: '#/components/schemas/RateLimitError'
359359
description: Rate Limit Exceeded
360360
security:
361-
- user_auth_key: []
361+
- organization_api_key: []
362362
summary: Create an app
363363
x-content-type: application/json
364364
x-accepts: application/json
@@ -395,7 +395,7 @@ paths:
395395
$ref: '#/components/schemas/RateLimitError'
396396
description: Rate Limit Exceeded
397397
security:
398-
- user_auth_key: []
398+
- organization_api_key: []
399399
summary: View an app
400400
x-accepts: application/json
401401
put:
@@ -437,7 +437,7 @@ paths:
437437
$ref: '#/components/schemas/RateLimitError'
438438
description: Rate Limit Exceeded
439439
security:
440-
- user_auth_key: []
440+
- organization_api_key: []
441441
summary: Update an app
442442
x-content-type: application/json
443443
x-accepts: application/json
@@ -4048,7 +4048,7 @@ components:
40484048
rest_api_key:
40494049
scheme: bearer
40504050
type: http
4051-
user_auth_key:
4051+
organization_api_key:
40524052
scheme: bearer
40534053
type: http
40544054

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apply plugin: 'java'
44
apply plugin: 'com.diffplug.spotless'
55

66
group = 'org.openapitools'
7-
version = '5.0.1'
7+
version = '5.1.0'
88

99
buildscript {
1010
repositories {

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
22
settings(
33
organization := "org.openapitools",
44
name := "onesignal-java-client",
5-
version := "5.0.1",
5+
version := "5.1.0",
66
scalaVersion := "2.11.4",
77
scalacOptions ++= Seq("-feature"),
88
javacOptions in compile ++= Seq("-Xlint:deprecation"),

docs/DefaultApi.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,9 @@ public class Example {
283283
ApiClient defaultClient = Configuration.getDefaultApiClient();
284284
defaultClient.setBasePath("https://api.onesignal.com");
285285

286-
// Configure HTTP bearer authorization: user_auth_key
287-
HttpBearerAuth user_auth_key = (HttpBearerAuth) defaultClient.getAuthentication("user_auth_key");
288-
user_auth_key.setBearerToken("BEARER TOKEN");
286+
// Configure HTTP bearer authorization: organization_api_key
287+
HttpBearerAuth organization_api_key = (HttpBearerAuth) defaultClient.getAuthentication("organization_api_key");
288+
organization_api_key.setBearerToken("BEARER TOKEN");
289289

290290
DefaultApi apiInstance = new DefaultApi(defaultClient);
291291
App app = new App(); // App |
@@ -315,7 +315,7 @@ public class Example {
315315

316316
### Authorization
317317

318-
[user_auth_key](../README.md#user_auth_key)
318+
[organization_api_key](../README.md#organization_api_key)
319319

320320
### HTTP request headers
321321

@@ -1227,9 +1227,9 @@ public class Example {
12271227
ApiClient defaultClient = Configuration.getDefaultApiClient();
12281228
defaultClient.setBasePath("https://api.onesignal.com");
12291229

1230-
// Configure HTTP bearer authorization: user_auth_key
1231-
HttpBearerAuth user_auth_key = (HttpBearerAuth) defaultClient.getAuthentication("user_auth_key");
1232-
user_auth_key.setBearerToken("BEARER TOKEN");
1230+
// Configure HTTP bearer authorization: organization_api_key
1231+
HttpBearerAuth organization_api_key = (HttpBearerAuth) defaultClient.getAuthentication("organization_api_key");
1232+
organization_api_key.setBearerToken("BEARER TOKEN");
12331233

12341234
DefaultApi apiInstance = new DefaultApi(defaultClient);
12351235
String appId = "appId_example"; // String | An app id
@@ -1259,7 +1259,7 @@ public class Example {
12591259

12601260
### Authorization
12611261

1262-
[user_auth_key](../README.md#user_auth_key)
1262+
[organization_api_key](../README.md#organization_api_key)
12631263

12641264
### HTTP request headers
12651265

@@ -1296,9 +1296,9 @@ public class Example {
12961296
ApiClient defaultClient = Configuration.getDefaultApiClient();
12971297
defaultClient.setBasePath("https://api.onesignal.com");
12981298

1299-
// Configure HTTP bearer authorization: user_auth_key
1300-
HttpBearerAuth user_auth_key = (HttpBearerAuth) defaultClient.getAuthentication("user_auth_key");
1301-
user_auth_key.setBearerToken("BEARER TOKEN");
1299+
// Configure HTTP bearer authorization: organization_api_key
1300+
HttpBearerAuth organization_api_key = (HttpBearerAuth) defaultClient.getAuthentication("organization_api_key");
1301+
organization_api_key.setBearerToken("BEARER TOKEN");
13021302

13031303
DefaultApi apiInstance = new DefaultApi(defaultClient);
13041304
try {
@@ -1324,7 +1324,7 @@ This endpoint does not need any parameter.
13241324

13251325
### Authorization
13261326

1327-
[user_auth_key](../README.md#user_auth_key)
1327+
[organization_api_key](../README.md#organization_api_key)
13281328

13291329
### HTTP request headers
13301330

@@ -1954,9 +1954,9 @@ public class Example {
19541954
ApiClient defaultClient = Configuration.getDefaultApiClient();
19551955
defaultClient.setBasePath("https://api.onesignal.com");
19561956

1957-
// Configure HTTP bearer authorization: user_auth_key
1958-
HttpBearerAuth user_auth_key = (HttpBearerAuth) defaultClient.getAuthentication("user_auth_key");
1959-
user_auth_key.setBearerToken("BEARER TOKEN");
1957+
// Configure HTTP bearer authorization: organization_api_key
1958+
HttpBearerAuth organization_api_key = (HttpBearerAuth) defaultClient.getAuthentication("organization_api_key");
1959+
organization_api_key.setBearerToken("BEARER TOKEN");
19601960

19611961
DefaultApi apiInstance = new DefaultApi(defaultClient);
19621962
String appId = "appId_example"; // String | An app id
@@ -1988,7 +1988,7 @@ public class Example {
19881988

19891989
### Authorization
19901990

1991-
[user_auth_key](../README.md#user_auth_key)
1991+
[organization_api_key](../README.md#organization_api_key)
19921992

19931993
### HTTP request headers
19941994

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>onesignal-java-client</artifactId>
66
<packaging>jar</packaging>
77
<name>onesignal-java-client</name>
8-
<version>5.0.1</version>
8+
<version>5.1.0</version>
99
<url>https://github.com/openapitools/openapi-generator</url>
1010
<description>OpenAPI Java</description>
1111
<scm>

src/main/java/com/onesignal/client/ApiCallback.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 5.0.1
5+
* The version of the OpenAPI document: 5.1.0
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

src/main/java/com/onesignal/client/ApiClient.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 5.0.1
5+
* The version of the OpenAPI document: 5.1.0
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -90,8 +90,8 @@ public ApiClient() {
9090
initHttpClient();
9191

9292
// Setup authentications (key: authentication name, value: authentication).
93+
authentications.put("organization_api_key", new HttpBearerAuth("Key"));
9394
authentications.put("rest_api_key", new HttpBearerAuth("Key"));
94-
authentications.put("user_auth_key", new HttpBearerAuth("Key"));
9595
// Prevent the authentications from being modified.
9696
authentications = Collections.unmodifiableMap(authentications);
9797
}
@@ -107,8 +107,8 @@ public ApiClient(OkHttpClient client) {
107107
httpClient = client;
108108

109109
// Setup authentications (key: authentication name, value: authentication).
110+
authentications.put("organization_api_key", new HttpBearerAuth("Key"));
110111
authentications.put("rest_api_key", new HttpBearerAuth("Key"));
111-
authentications.put("user_auth_key", new HttpBearerAuth("Key"));
112112
// Prevent the authentications from being modified.
113113
authentications = Collections.unmodifiableMap(authentications);
114114
}
@@ -133,7 +133,7 @@ private void init() {
133133
json = new JSON();
134134

135135
// Set default User-Agent.
136-
setUserAgent("OpenAPI-Generator/5.0.1/java");
136+
setUserAgent("OpenAPI-Generator/5.1.0/java");
137137

138138
authentications = new HashMap<String, Authentication>();
139139
}

src/main/java/com/onesignal/client/ApiException.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 5.0.1
5+
* The version of the OpenAPI document: 5.1.0
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -22,7 +22,7 @@
2222
* <p>ApiException class.</p>
2323
*/
2424
@SuppressWarnings("serial")
25-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-13T23:45:41.211Z[Etc/UTC]")
25+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-05T20:14:26.949Z[Etc/UTC]")
2626
public class ApiException extends Exception {
2727
private int code = 0;
2828
private Map<String, List<String>> responseHeaders = null;

src/main/java/com/onesignal/client/ApiResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* OneSignal
33
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
44
*
5-
* The version of the OpenAPI document: 5.0.1
5+
* The version of the OpenAPI document: 5.1.0
66
* Contact: [email protected]
77
*
88
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

0 commit comments

Comments
 (0)