Skip to content

Commit 00d57f7

Browse files
committed
Release 0.0.40
1 parent b93fdf5 commit 00d57f7

23 files changed

+307
-97
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ publishing {
3636
maven(MavenPublication) {
3737
groupId = 'dev.ravenapp'
3838
artifactId = 'raven-java'
39-
version = '0.0.39'
39+
version = '0.0.40'
4040
from components.java
4141
}
4242
}

src/main/java/com/raven/api/client/device/DeviceService.java renamed to src/main/java/com/raven/api/client/device/deviceService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@Consumes(MediaType.APPLICATION_JSON)
2828
@Produces(MediaType.APPLICATION_JSON)
2929
@Path("/v1/apps")
30-
interface DeviceService {
30+
interface deviceService {
3131
@POST
3232
@Path("/{app_id}/users/{user_id}/devices")
3333
Device add(@HeaderParam("Authorization") Authorization auth, @PathParam("app_id") String appId,
@@ -51,11 +51,11 @@ Device getDevice(@HeaderParam("Authorization") Authorization auth,
5151
@PathParam("app_id") String appId, @PathParam("user_id") String userId,
5252
@PathParam("device_id") String deviceId) throws GetDeviceException;
5353

54-
static DeviceService getClient(String url) {
54+
static deviceService getClient(String url) {
5555
return Feign.builder()
5656
.contract(new OptionalAwareContract(new JAXRSContract()))
5757
.decoder(new JacksonDecoder(ObjectMappers.JSON_MAPPER))
5858
.encoder(new JacksonEncoder(ObjectMappers.JSON_MAPPER))
59-
.errorDecoder(new DeviceServiceErrorDecoder()).target(DeviceService.class, url);
59+
.errorDecoder(new deviceServiceErrorDecoder()).target(deviceService.class, url);
6060
}
6161
}

src/main/java/com/raven/api/client/device/DeviceServiceClient.java renamed to src/main/java/com/raven/api/client/device/deviceServiceClient.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414
import java.lang.String;
1515
import java.util.Optional;
1616

17-
public final class DeviceServiceClient {
18-
private final DeviceService service;
17+
public final class deviceServiceClient {
18+
private final deviceService service;
1919

2020
private final Optional<Authorization> auth;
2121

22-
public DeviceServiceClient(String url) {
23-
this.service = DeviceService.getClient(url);
22+
public deviceServiceClient(String url) {
23+
this.service = deviceService.getClient(url);
2424
this.auth = Optional.empty();
2525
}
2626

27-
public DeviceServiceClient(String url, Authorization auth) {
28-
this.service = DeviceService.getClient(url);
27+
public deviceServiceClient(String url, Authorization auth) {
28+
this.service = deviceService.getClient(url);
2929
this.auth = Optional.of(auth);
3030
}
3131

src/main/java/com/raven/api/client/device/DeviceServiceErrorDecoder.java renamed to src/main/java/com/raven/api/client/device/deviceServiceErrorDecoder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import java.lang.RuntimeException;
1515
import java.lang.String;
1616

17-
final class DeviceServiceErrorDecoder implements ErrorDecoder {
17+
final class deviceServiceErrorDecoder implements ErrorDecoder {
1818
@Override
1919
public Exception decode(String methodKey, Response response) {
2020
try {

src/main/java/com/raven/api/client/device/exceptions/AddException.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@ public static AddException other(Object unknownValue, int statusCode) {
4141
return new AddException(new UnknownErrorValue(unknownValue), statusCode);
4242
}
4343

44-
public boolean isOther() {
44+
public boolean _isOther() {
4545
return value instanceof UnknownErrorValue;
4646
}
4747

48-
public Optional<Object> getOther() {
49-
if (isOther()) {
48+
public Optional<Object> _getOther() {
49+
if (_isOther()) {
5050
return Optional.of(((UnknownErrorValue) value).unknownValue);
5151
}
5252
return Optional.empty();
5353
}
5454

5555
public interface Visitor<T> {
56-
T visitOther(Object other);
56+
T _visitOther(Object otherType);
5757
}
5858

5959
@JsonTypeInfo(
@@ -81,7 +81,7 @@ private static final class UnknownErrorValue implements Value {
8181

8282
@Override
8383
public <T> T visit(Visitor<T> visitor) {
84-
return visitor.visitOther(unknownValue);
84+
return visitor._visitOther(unknownValue);
8585
}
8686

8787
@Override

src/main/java/com/raven/api/client/device/exceptions/DeleteException.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@ public static DeleteException other(Object unknownValue, int statusCode) {
4141
return new DeleteException(new UnknownErrorValue(unknownValue), statusCode);
4242
}
4343

44-
public boolean isOther() {
44+
public boolean _isOther() {
4545
return value instanceof UnknownErrorValue;
4646
}
4747

48-
public Optional<Object> getOther() {
49-
if (isOther()) {
48+
public Optional<Object> _getOther() {
49+
if (_isOther()) {
5050
return Optional.of(((UnknownErrorValue) value).unknownValue);
5151
}
5252
return Optional.empty();
5353
}
5454

5555
public interface Visitor<T> {
56-
T visitOther(Object other);
56+
T _visitOther(Object otherType);
5757
}
5858

5959
@JsonTypeInfo(
@@ -81,7 +81,7 @@ private static final class UnknownErrorValue implements Value {
8181

8282
@Override
8383
public <T> T visit(Visitor<T> visitor) {
84-
return visitor.visitOther(unknownValue);
84+
return visitor._visitOther(unknownValue);
8585
}
8686

8787
@Override

src/main/java/com/raven/api/client/device/exceptions/GetDeviceException.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@ public static GetDeviceException other(Object unknownValue, int statusCode) {
4141
return new GetDeviceException(new UnknownErrorValue(unknownValue), statusCode);
4242
}
4343

44-
public boolean isOther() {
44+
public boolean _isOther() {
4545
return value instanceof UnknownErrorValue;
4646
}
4747

48-
public Optional<Object> getOther() {
49-
if (isOther()) {
48+
public Optional<Object> _getOther() {
49+
if (_isOther()) {
5050
return Optional.of(((UnknownErrorValue) value).unknownValue);
5151
}
5252
return Optional.empty();
5353
}
5454

5555
public interface Visitor<T> {
56-
T visitOther(Object other);
56+
T _visitOther(Object otherType);
5757
}
5858

5959
@JsonTypeInfo(
@@ -81,7 +81,7 @@ private static final class UnknownErrorValue implements Value {
8181

8282
@Override
8383
public <T> T visit(Visitor<T> visitor) {
84-
return visitor.visitOther(unknownValue);
84+
return visitor._visitOther(unknownValue);
8585
}
8686

8787
@Override

src/main/java/com/raven/api/client/device/exceptions/UpdateException.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@ public static UpdateException other(Object unknownValue, int statusCode) {
4141
return new UpdateException(new UnknownErrorValue(unknownValue), statusCode);
4242
}
4343

44-
public boolean isOther() {
44+
public boolean _isOther() {
4545
return value instanceof UnknownErrorValue;
4646
}
4747

48-
public Optional<Object> getOther() {
49-
if (isOther()) {
48+
public Optional<Object> _getOther() {
49+
if (_isOther()) {
5050
return Optional.of(((UnknownErrorValue) value).unknownValue);
5151
}
5252
return Optional.empty();
5353
}
5454

5555
public interface Visitor<T> {
56-
T visitOther(Object other);
56+
T _visitOther(Object otherType);
5757
}
5858

5959
@JsonTypeInfo(
@@ -81,7 +81,7 @@ private static final class UnknownErrorValue implements Value {
8181

8282
@Override
8383
public <T> T visit(Visitor<T> visitor) {
84-
return visitor.visitOther(unknownValue);
84+
return visitor._visitOther(unknownValue);
8585
}
8686

8787
@Override

src/main/java/com/raven/api/client/event/endpoints/Send.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ public Optional<String> getIdempotencyKey() {
4343
return idempotencyKey;
4444
}
4545

46+
/**
47+
* @return The <code>id</code> of the app
48+
*/
4649
public String getAppId() {
4750
return appId;
4851
}
@@ -125,6 +128,10 @@ public Builder from(Request other) {
125128
return this;
126129
}
127130

131+
/**
132+
* <p>The <code>id</code> of the app</p>
133+
* @return Reference to {@code this} so that method calls can be chained together.
134+
*/
128135
@Override
129136
public BodyStage appId(String appId) {
130137
this.appId = appId;
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package com.raven.api.client.event.errors;
2+
3+
import com.fasterxml.jackson.annotation.JsonCreator;
4+
import com.fasterxml.jackson.annotation.JsonValue;
5+
import com.raven.api.client.event.types.EventNotFoundErrorBody;
6+
import java.lang.Object;
7+
import java.lang.Override;
8+
import java.lang.String;
9+
10+
public final class EventNotFoundError {
11+
private final EventNotFoundErrorBody value;
12+
13+
private EventNotFoundError(EventNotFoundErrorBody value) {
14+
this.value = value;
15+
}
16+
17+
@JsonValue
18+
public EventNotFoundErrorBody get() {
19+
return this.value;
20+
}
21+
22+
@Override
23+
public boolean equals(Object other) {
24+
return this == other || (other instanceof EventNotFoundError && this.value.equals(((EventNotFoundError) other).value));
25+
}
26+
27+
@Override
28+
public int hashCode() {
29+
return value.hashCode();
30+
}
31+
32+
@Override
33+
public String toString() {
34+
return value.toString();
35+
}
36+
37+
@JsonCreator(
38+
mode = JsonCreator.Mode.DELEGATING
39+
)
40+
public static EventNotFoundError of(EventNotFoundErrorBody value) {
41+
return new EventNotFoundError(value);
42+
}
43+
}

0 commit comments

Comments
 (0)