Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
sync with new API
  • Loading branch information
mtinnes committed Aug 31, 2017
1 parent 73ef4c3 commit 33e432e
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -20,14 +20,14 @@ To use the package, you need to use following Maven dependency:
<dependency>
<groupId>com.reveldigital</groupId>
<artifactId>reveldigital-api</artifactId>
<version>1.4.20</version>
<version>1.4.22</version>
</dependency>
```

or Gradle:

```groovy
compile 'com.reveldigital:reveldigital-api:1.4.20'
compile 'com.reveldigital:reveldigital-api:1.4.22'
```

or download jars from Maven repository.
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Expand Up @@ -19,4 +19,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4-all.zip
Expand Up @@ -37,11 +37,11 @@ public void getAccount(Callback<Account> callback) throws RequestException {
wrapper.getAccount().enqueue(callback);
}

public Account updateAccount(@Body Account account) throws RequestException, IOException {
public Void updateAccount(@Body Account account) throws RequestException, IOException {
return verifyResponse(wrapper.updateAccount(account).execute());
}

public void updateAccount(@Body Account account, Callback<Account> callback) throws RequestException {
public void updateAccount(@Body Account account, Callback<Void> callback) throws RequestException {
wrapper.updateAccount(account).enqueue(callback);
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/reveldigital/api/service/DeviceService.java
Expand Up @@ -61,11 +61,11 @@ public void getGroups(Callback<List<Group>> callback) throws RequestException {
wrapper.getGroups().enqueue(callback);
}

public Device updateDevice(Device device) throws RequestException, IOException {
public Void updateDevice(Device device) throws RequestException, IOException {
return verifyResponse(wrapper.updateDevice(device.getId(), device).execute());
}

public void updateDevice(Device device, Callback<Device> callback) throws RequestException {
public void updateDevice(Device device, Callback<Void> callback) throws RequestException {
wrapper.updateDevice(device.getId(), device).enqueue(callback);
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/reveldigital/api/service/UserService.java
Expand Up @@ -45,11 +45,11 @@ public void getUser(String id, Callback<User> callback) throws RequestException
wrapper.getUser(id).enqueue(callback);
}

public User updateUser(User user) throws RequestException, IOException {
public Void updateUser(User user) throws RequestException, IOException {
return verifyResponse(wrapper.updateUser(user.getId(), user).execute());
}

public void updateUser(User user, Callback<User> callback) throws RequestException {
public void updateUser(User user, Callback<Void> callback) throws RequestException {
wrapper.updateUser(user.getId(), user).enqueue(callback);
}

Expand Down
Expand Up @@ -34,5 +34,5 @@ public interface AccountInterface {
Call<Account> getAccount() throws RequestException;

@PUT(SEGMENT_ACCOUNT)
Call<Account> updateAccount(@Body Account account) throws RequestException;
Call<Void> updateAccount(@Body Account account) throws RequestException;
}
Expand Up @@ -40,7 +40,7 @@ public interface DeviceInterface {
Call<List<Group>> getGroups() throws RequestException;

@PUT(SEGMENT_DEVICES + "/{id}")
Call<Device> updateDevice(@Path("id") String id, @Body Device device) throws RequestException;
Call<Void> updateDevice(@Path("id") String id, @Body Device device) throws RequestException;

@POST(SEGMENT_DEVICES)
Call<Device> createDevice(@Query("activation_code") String activationCode, @Body Device device) throws RequestException;
Expand Down
Expand Up @@ -37,7 +37,7 @@ public interface UserInterface {
Call<User> getUser(@Path("id") String id) throws RequestException;

@PUT(SEGMENT_USERS + "/{id}")
Call<User> updateUser(@Path("id") String id, @Body User user) throws RequestException;
Call<Void> updateUser(@Path("id") String id, @Body User user) throws RequestException;

@POST(SEGMENT_USERS)
Call<User> createUser(@Body User user) throws RequestException;
Expand Down
Expand Up @@ -82,7 +82,7 @@ public void testPostCommandSets() throws Exception {

@Test
public void testUpdateDevice() throws Exception {
Device device = service.getDevice("1isK8nR0Rm64ofWAUmHVdQ");
Device device = service.getDevice("PW1xqhnV40WwR_9DISHl5A");
device.setTags("ABC");
device.setLastService(new Date());
service.updateDevice(device);
Expand Down

0 comments on commit 33e432e

Please sign in to comment.