public interface GroupsApi
| Modifier and Type | Method and Description |
|---|---|
rx.Observable<java.lang.Void> |
addDevice(java.lang.String groupId,
GroupDeviceAdd deviceIds)
Adds device to a group and returns 200 OK if successful, error otherwise.
|
rx.Observable<Group> |
createGroup(GroupCreate groupCreate)
Creates new group and returns 200 OK if group is successfully created, error otherwise.
|
rx.Observable<java.lang.Void> |
deleteDevice(java.lang.String groupId,
java.lang.String deviceId)
Deletes device from a group and returns 200 OK if successful, error otherwise.
|
rx.Observable<java.lang.Void> |
deleteGroup(java.lang.String groupId)
Deletes group and returns 200 OK if group is successfully updated, error otherwise.
|
rx.Observable<Group> |
getGroup(java.lang.String groupId)
Returns group defined with groupId
|
rx.Observable<java.lang.Void> |
updateDevicePosition(java.lang.String groupId,
java.lang.String deviceId,
PositionUpdate update)
Updates device's position in a group and returns 200 OK if successful, error otherwise.
|
rx.Observable<java.lang.Void> |
updateGroup(GroupCreate group,
java.lang.String groupId)
Updates group and returns 200 OK if group is successfully updated, error otherwise.
|
@POST(value="/groups") rx.Observable<Group> createGroup(@Body GroupCreate groupCreate)
groupCreate - GroupCreateObservable@GET(value="/groups/{groupId}")
rx.Observable<Group> getGroup(@Path(value="groupId")
java.lang.String groupId)
groupId - Group.idObservable@PATCH(value="/groups/{groupId}")
rx.Observable<java.lang.Void> updateGroup(@Body
GroupCreate group,
@Path(value="groupId")
java.lang.String groupId)
group - group object with updated fieldsgroupId - Group.idObservable@POST(value="/groups/{groupId}")
rx.Observable<java.lang.Void> addDevice(@Path(value="groupId")
java.lang.String groupId,
@Body
GroupDeviceAdd deviceIds)
@DELETE(value="/groups/{groupId}/devices/{deviceId}")
rx.Observable<java.lang.Void> deleteDevice(@Path(value="groupId")
java.lang.String groupId,
@Path(value="deviceId")
java.lang.String deviceId)
@PATCH(value="/groups/{groupId}/devices/{deviceId}")
rx.Observable<java.lang.Void> updateDevicePosition(@Path(value="groupId")
java.lang.String groupId,
@Path(value="deviceId")
java.lang.String deviceId,
@Body
PositionUpdate update)
@DELETE(value="/groups/{groupId}")
rx.Observable<java.lang.Void> deleteGroup(@Path(value="groupId")
java.lang.String groupId)
groupId - Group.idObservable