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 WearablesResource

Manages 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 ProvidersResource

Wearable provider settings under /v1/wearables/providers.

ProvidersResource.list

public JsonNode list() throws IOException, InterruptedException

Lists the configured providers (GET /v1/wearables/providers).

Returns: the response body

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response
public JsonNode list(RequestOptions options) throws IOException, InterruptedException

Lists 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 read
  • InterruptedException: if the thread is interrupted while waiting for the response

ProvidersResource.retrieve

public JsonNode retrieve(String provider) throws IOException, InterruptedException

Reads 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 read
  • InterruptedException: if the thread is interrupted while waiting for the response
public JsonNode retrieve(
        String provider,
        RequestOptions options) throws IOException, InterruptedException

Reads a provider (GET /v1/wearables/providers/{provider}).

Parameters:

  • provider: the provider name
  • 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 read
  • InterruptedException: if the thread is interrupted while waiting for the response

ProvidersResource.create

public JsonNode create(Object body) throws IOException, InterruptedException

Configures 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 read
  • InterruptedException: if the thread is interrupted while waiting for the response
public JsonNode create(Object body, RequestOptions options) throws IOException, InterruptedException

Configures a provider (POST /v1/wearables/providers).

Parameters:

  • body: the provider settings
  • 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 read
  • InterruptedException: if the thread is interrupted while waiting for the response

ProvidersResource.patch

public JsonNode patch(String provider, Object body) throws IOException, InterruptedException

Updates a provider (PATCH /v1/wearables/providers/{provider}).

Parameters:

  • provider: the provider name
  • body: the fields to change

Returns: the response body

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response
public JsonNode patch(
        String provider,
        Object body,
        RequestOptions options) throws IOException, InterruptedException

Updates a provider (PATCH /v1/wearables/providers/{provider}).

Parameters:

  • provider: the provider name
  • body: the fields to change
  • 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 read
  • InterruptedException: if the thread is interrupted while waiting for the response

ProvidersResource.delete

public void delete(String provider) throws IOException, InterruptedException

Removes 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 read
  • InterruptedException: if the thread is interrupted while waiting for the response
public void delete(String provider, RequestOptions options) throws IOException, InterruptedException

Removes a provider (DELETE /v1/wearables/providers/{provider}).

Parameters:

  • provider: the provider name
  • options: per-request options, such as the timeout

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

WearablesResource.ConnectionsResource

public static final class ConnectionsResource

The caller's wearable connections under /v1/wearables/connections.

ConnectionsResource.list

public JsonNode list() throws IOException, InterruptedException

Lists 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 read
  • InterruptedException: if the thread is interrupted while waiting for the response
public JsonNode list(RequestOptions options) throws IOException, InterruptedException

Lists 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 read
  • InterruptedException: if the thread is interrupted while waiting for the response

ConnectionsResource.authorize

public JsonNode authorize(String provider) throws IOException, InterruptedException

Starts 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 read
  • InterruptedException: if the thread is interrupted while waiting for the response
public JsonNode authorize(
        String provider,
        RequestOptions options) throws IOException, InterruptedException

Starts connecting a provider (POST /v1/wearables/connections/{provider}/authorize).

Parameters:

  • provider: the provider name
  • 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 read
  • InterruptedException: if the thread is interrupted while waiting for the response

ConnectionsResource.sync

public JsonNode sync(String provider) throws IOException, InterruptedException

Syncs 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 read
  • InterruptedException: if the thread is interrupted while waiting for the response
public JsonNode sync(
        String provider,
        RequestOptions options) throws IOException, InterruptedException

Syncs data from a provider (POST /v1/wearables/connections/{provider}/sync).

Parameters:

  • provider: the provider name
  • 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 read
  • InterruptedException: if the thread is interrupted while waiting for the response

ConnectionsResource.delete

public void delete(String provider) throws IOException, InterruptedException

Disconnects 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 read
  • InterruptedException: if the thread is interrupted while waiting for the response
public void delete(String provider, RequestOptions options) throws IOException, InterruptedException

Disconnects a provider (DELETE /v1/wearables/connections/{provider}).

Parameters:

  • provider: the provider name
  • options: per-request options, such as the timeout

Throws:

  • IOException: if the request cannot be sent or the response cannot be read
  • InterruptedException: if the thread is interrupted while waiting for the response

Last updated on

On this page