WearablesResource
Manages wearable providers and connections under /v1/wearables.
- Stable unknown
- Release candidate since 0.1.0-rc.4
- Development since 0.1.0-dev.24+fa54770
public final class WearablesResourceManages wearable providers and connections under /v1/wearables. Get it from Ovok.wearables().
Methods
providers
public WearablesResource.ProvidersResource providers()Returns the wearable provider settings.
Returns: the providers resource
connections
public WearablesResource.ConnectionsResource connections()Returns the caller's wearable connections.
Returns: the connections resource
WearablesResource.ProvidersResource
public static final class ProvidersResourceWearable provider settings under /v1/wearables/providers.
ProvidersResource.list
public JsonNode list() throws IOException, InterruptedExceptionLists the configured providers (GET /v1/wearables/providers).
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
public JsonNode list(RequestOptions options) throws IOException, InterruptedExceptionLists the configured providers (GET /v1/wearables/providers).
Parameters:
options: 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
ProvidersResource.retrieve
public JsonNode retrieve(String provider) throws IOException, InterruptedExceptionReads a provider (GET /v1/wearables/providers/{provider}).
Parameters:
provider: the provider name
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
public JsonNode retrieve(
String provider,
RequestOptions options) throws IOException, InterruptedExceptionReads a provider (GET /v1/wearables/providers/{provider}).
Parameters:
provider: the provider nameoptions: 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
ProvidersResource.create
public JsonNode create(Object body) throws IOException, InterruptedExceptionConfigures a provider (POST /v1/wearables/providers).
Parameters:
body: the provider settings
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
public JsonNode create(Object body, RequestOptions options) throws IOException, InterruptedExceptionConfigures a provider (POST /v1/wearables/providers).
Parameters:
body: the provider settingsoptions: 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
ProvidersResource.patch
public JsonNode patch(String provider, Object body) throws IOException, InterruptedExceptionUpdates a provider (PATCH /v1/wearables/providers/{provider}).
Parameters:
provider: the provider namebody: the fields to change
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
public JsonNode patch(
String provider,
Object body,
RequestOptions options) throws IOException, InterruptedExceptionUpdates a provider (PATCH /v1/wearables/providers/{provider}).
Parameters:
provider: the provider namebody: the fields to changeoptions: 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
ProvidersResource.delete
public void delete(String provider) throws IOException, InterruptedExceptionRemoves a provider (DELETE /v1/wearables/providers/{provider}).
Parameters:
provider: the provider name
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
public void delete(String provider, RequestOptions options) throws IOException, InterruptedExceptionRemoves a provider (DELETE /v1/wearables/providers/{provider}).
Parameters:
provider: the provider nameoptions: 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
WearablesResource.ConnectionsResource
public static final class ConnectionsResourceThe caller's wearable connections under /v1/wearables/connections.
ConnectionsResource.list
public JsonNode list() throws IOException, InterruptedExceptionLists the caller's connections (GET /v1/wearables/connections).
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
public JsonNode list(RequestOptions options) throws IOException, InterruptedExceptionLists the caller's connections (GET /v1/wearables/connections).
Parameters:
options: 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
ConnectionsResource.authorize
public JsonNode authorize(String provider) throws IOException, InterruptedExceptionStarts connecting a provider (POST /v1/wearables/connections/{provider}/authorize).
Parameters:
provider: the provider name
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
public JsonNode authorize(
String provider,
RequestOptions options) throws IOException, InterruptedExceptionStarts connecting a provider (POST /v1/wearables/connections/{provider}/authorize).
Parameters:
provider: the provider nameoptions: 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
ConnectionsResource.sync
public JsonNode sync(String provider) throws IOException, InterruptedExceptionSyncs data from a provider (POST /v1/wearables/connections/{provider}/sync).
Parameters:
provider: the provider name
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
public JsonNode sync(
String provider,
RequestOptions options) throws IOException, InterruptedExceptionSyncs data from a provider (POST /v1/wearables/connections/{provider}/sync).
Parameters:
provider: the provider nameoptions: 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
ConnectionsResource.delete
public void delete(String provider) throws IOException, InterruptedExceptionDisconnects a provider (DELETE /v1/wearables/connections/{provider}).
Parameters:
provider: the provider name
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
public void delete(String provider, RequestOptions options) throws IOException, InterruptedExceptionDisconnects a provider (DELETE /v1/wearables/connections/{provider}).
Parameters:
provider: the provider nameoptions: 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