LocationsResource
Manages locations through the slim API.
- Stable unknown
- Release candidate since 0.1.0-rc.4
- Development since 0.1.0-dev.24+fa54770
public final class LocationsResourceManages locations through the slim API. Get it from SlimResource.locations().
Methods
list
public Page<JsonNode> list(
Map<String, ?> query,
RequestOptions options) throws IOException, InterruptedExceptionLists locations (GET /v1/slim/location).
Parameters:
query: query parameters;nullvalues are skippedoptions: per-request options, such as the timeout
Returns: the first page; iterating it loads the next pages
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
retrieve
public JsonNode retrieve(String id, RequestOptions options) throws IOException, InterruptedExceptionGets one location (GET /v1/slim/location/{id}).
Parameters:
id: the location IDoptions: per-request options, such as the timeout
Returns: the response body
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
create
public JsonNode create(Object body, RequestOptions options) throws IOException, InterruptedExceptionCreates a location (POST /v1/slim/location).
Parameters:
body: the location to createoptions: per-request options, such as the timeout
Returns: the response body
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
update
public JsonNode update(
String id,
Object body,
RequestOptions options) throws IOException, InterruptedExceptionReplaces a location (PUT /v1/slim/location/{id}).
Parameters:
id: the location IDbody: the full locationoptions: per-request options, such as the timeout
Returns: the response body
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
delete
public void delete(String id, RequestOptions options) throws IOException, InterruptedExceptionDeletes a location (DELETE /v1/slim/location/{id}).
Parameters:
id: the location IDoptions: per-request options, such as the timeout
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Last updated on