@@ -14,7 +14,7 @@ API documentation is available at <https://docs.ravenapp.dev/introduction>.
1414Add this dependency to your project's build file:
1515
1616``` groovy
17- implementation "dev.ravenapp:raven-java:0.0.33 "
17+ implementation "dev.ravenapp:raven-java:0.0.50 "
1818```
1919
2020### Maven users
@@ -25,28 +25,25 @@ Add this dependency to your project's POM:
2525<dependency >
2626 <groupId >dev.ravenapp</groupId >
2727 <artifactId >raven-java</artifactId >
28- <version >0.0.33 </version >
28+ <version >0.0.50 </version >
2929</dependency >
3030```
3131
3232## Usage
3333
3434``` java
35- RavenApiClient ravenApiClient = new RavenApiClient (Authorization . of(" AuthKey <auth>" ));
36- try {
37- var response = client. send(Send . Request . builder()
38- .appId(" <app_id>" )
39- .body(SendEventRequest . builder()
40- .event(" payment_alert" )
41- .data(Map . of(" name" , " Adam" ))
42- .user(User . builder(). mobile(" +1234567890" ). build())
43- .build())
44- .build());
45-
46- System . out. println(response. getId());
47- } catch (SendException e) {
48- System . out. println(" Failed to send request" + e. getMessage());
49- }
35+
36+ RavenApiClient ravenApiClient = RavenApiClient . builder()
37+ .authKey(System . getenv(" RAVEN_TOKEN" ))
38+ .build();
39+
40+ var response = client. send(" appId" , SendEventRequest . builder()
41+ .event(" payment_alert" )
42+ .data(Map . of(" name" , " Adam" ))
43+ .user(User . builder(). mobile(" +1234567890" ). build())
44+ .build());
45+
46+ System . out. println(response. getId());
5047```
5148
5249## Sample app
0 commit comments