Spatio.Api.Connections (spatio_sdk v0.0.2)
API calls for all endpoints tagged Connections.
Summary
Functions
Disconnect a connected account.
Begin an OAuth install for a connection.
List the caller's multi-provider accounts.
List supported integrations + their connection state. Legacy path; /v1/connections/list is the preferred alias.
List supported integrations + their connection state.
List the caller's connected accounts.
Force a refresh of a connection's OAuth tokens.
Remove an account.
Resolve an account by provider/identifier.
Force a sync against the upstream provider.
Update account metadata (label, etc.).
Functions
@spec disconnect_connection( Tesla.Env.client(), Spatio.Model.DisconnectConnectionRequest.t(), keyword() ) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Disconnect a connected account.
Parameters
connection(Spatio.Connection): Connection to serverdisconnect_connection_request(DisconnectConnectionRequest):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec install_connection( Tesla.Env.client(), Spatio.Model.InstallConnectionRequest.t(), keyword() ) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Begin an OAuth install for a connection.
Parameters
connection(Spatio.Connection): Connection to serverinstall_connection_request(InstallConnectionRequest):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec list_accounts( Tesla.Env.client(), keyword() ) :: {:ok, Spatio.Model.ApiError.t()} | {:ok, Spatio.Model.AccountListResponse.t()} | {:error, Tesla.Env.t()}
List the caller's multi-provider accounts.
Parameters
connection(Spatio.Connection): Connection to serveropts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.AccountListResponse.t}on success{:error, Tesla.Env.t}on failure
@spec list_connection_integrations( Tesla.Env.client(), keyword() ) :: {:ok, Spatio.Model.ConnectionListResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List supported integrations + their connection state. Legacy path; /v1/connections/list is the preferred alias.
Parameters
connection(Spatio.Connection): Connection to serveropts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.ConnectionListResponse.t}on success{:error, Tesla.Env.t}on failure
@spec list_connections( Tesla.Env.client(), keyword() ) :: {:ok, Spatio.Model.ConnectionListResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List supported integrations + their connection state.
Parameters
connection(Spatio.Connection): Connection to serveropts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.ConnectionListResponse.t}on success{:error, Tesla.Env.t}on failure
@spec list_user_connections( Tesla.Env.client(), keyword() ) :: {:ok, Spatio.Model.ConnectionAccountListResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List the caller's connected accounts.
Parameters
connection(Spatio.Connection): Connection to serveropts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.ConnectionAccountListResponse.t}on success{:error, Tesla.Env.t}on failure
@spec refresh_connection( Tesla.Env.client(), Spatio.Model.RefreshConnectionRequest.t(), keyword() ) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Force a refresh of a connection's OAuth tokens.
Parameters
connection(Spatio.Connection): Connection to serverrefresh_connection_request(RefreshConnectionRequest):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec remove_account(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Remove an account.
Parameters
connection(Spatio.Connection): Connection to serveraccount_id(String.t):opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec resolve_account( Tesla.Env.client(), keyword() ) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Resolve an account by provider/identifier.
Parameters
connection(Spatio.Connection): Connection to serveropts(keyword): Optional parameters:provider(String.t)::email(String.t):
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec sync_account(Tesla.Env.client(), String.t(), keyword()) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Force a sync against the upstream provider.
Parameters
connection(Spatio.Connection): Connection to serveraccount_id(String.t):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec update_account( Tesla.Env.client(), String.t(), Spatio.Model.UpdateAccountRequest.t(), keyword() ) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Update account metadata (label, etc.).
Parameters
connection(Spatio.Connection): Connection to serveraccount_id(String.t):update_account_request(UpdateAccountRequest):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure