Skip to content

Commit

Permalink
Release 0.0.19
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Oct 28, 2022
1 parent 8be7f18 commit 8ae288c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 32 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ java {
publishing {
publications {
maven(MavenPublication) {
groupId = 'io.github.fern-api'
artifactId = 'raven'
version = '0.0.15'
groupId = 'dev.ravenapp'
artifactId = 'raven-java'
version = '0.0.19'
from components.java
}
}
Expand Down
32 changes: 3 additions & 29 deletions sample-app/src/main/java/sample/App.java
Original file line number Diff line number Diff line change
@@ -1,35 +1,9 @@
package sample;

import com.raven.api.RavenApiClient;
import com.raven.api.client.Authorization;
import com.raven.api.client.device.endpoints.Add;
import com.raven.api.client.device.exceptions.AddException;
import com.raven.api.client.device.types.Device;
import com.raven.api.client.ids.types.AppId;
import com.raven.api.client.ids.types.UserId;
import java.lang.String;

public final class App {
public static void main(String[] args) {
String appId = System.getenv("RAVEN_APP_ID");
String authKey = System.getenv("RAVEN_TOKEN");
Authorization auth = Authorization.of(authKey);

RavenApiClient ravenApiClient =
new RavenApiClient("api.ravenapp.dev", auth);

try {
Device device = ravenApiClient.device().add(Add.Request.builder()
.appId(AppId.of(appId))
.userId(UserId.of("myUser"))
.body(Device.builder()
.fcmToken("abc123")
.id("cdf456")
.notificationsDisabled(false)
.build())
.build());
System.out.println("Created a device! The device's Raven ID is " + device.getRavenId());
} catch (AddException e) {
System.out.println("Failed to create a device" + e.getMessage());
}
// import com.raven.api.RavenApiClient
}
}
}

0 comments on commit 8ae288c

Please sign in to comment.