Spatio.Api.Routines (spatio_sdk v0.0.2)
API calls for all endpoints tagged Routines.
Summary
Functions
Worker claims a queued run.
Worker marks a run complete.
Create a routine.
Delete a routine.
Fetch a routine.
List runs for a routine.
List routines for the caller's workspace.
Trigger an ad-hoc run.
Update a routine.
Worker reports progress.
Functions
@spec claim_routine_run(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.RoutineRun.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Worker claims a queued run.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.RoutineRun.t}on success{:error, Tesla.Env.t}on failure
@spec complete_routine_run( Tesla.Env.client(), String.t(), Spatio.Model.RoutineRunCompleteRequest.t(), keyword() ) :: {:ok, Spatio.Model.RoutineRun.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Worker marks a run complete.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):routine_run_complete_request(RoutineRunCompleteRequest):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.RoutineRun.t}on success{:error, Tesla.Env.t}on failure
@spec create_routine( Tesla.Env.client(), Spatio.Model.CreateRoutineRequest.t(), keyword() ) :: {:ok, Spatio.Model.ApiError.t()} | {:ok, Spatio.Model.Routine.t()} | {:error, Tesla.Env.t()}
Create a routine.
Parameters
connection(Spatio.Connection): Connection to servercreate_routine_request(CreateRoutineRequest):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.Routine.t}on success{:error, Tesla.Env.t}on failure
@spec delete_routine(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Delete a routine.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec get_routine(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.ApiError.t()} | {:ok, Spatio.Model.Routine.t()} | {:error, Tesla.Env.t()}
Fetch a routine.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.Routine.t}on success{:error, Tesla.Env.t}on failure
@spec list_routine_runs(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.RoutineRunListResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List runs for a routine.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.RoutineRunListResponse.t}on success{:error, Tesla.Env.t}on failure
@spec list_routines( Tesla.Env.client(), keyword() ) :: {:ok, Spatio.Model.RoutineListResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List routines for the caller's workspace.
Parameters
connection(Spatio.Connection): Connection to serveropts(keyword): Optional parameters:workspaceId(String.t)::status(String.t):
Returns
{:ok, Spatio.Model.RoutineListResponse.t}on success{:error, Tesla.Env.t}on failure
@spec run_routine_now(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.RoutineRun.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Trigger an ad-hoc run.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.RoutineRun.t}on success{:error, Tesla.Env.t}on failure
@spec update_routine( Tesla.Env.client(), String.t(), Spatio.Model.UpdateRoutineRequest.t(), keyword() ) :: {:ok, Spatio.Model.ApiError.t()} | {:ok, Spatio.Model.Routine.t()} | {:error, Tesla.Env.t()}
Update a routine.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):update_routine_request(UpdateRoutineRequest):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.Routine.t}on success{:error, Tesla.Env.t}on failure
@spec update_routine_run_progress( Tesla.Env.client(), String.t(), Spatio.Model.RoutineRunProgressRequest.t(), keyword() ) :: {:ok, Spatio.Model.RoutineRun.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Worker reports progress.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):routine_run_progress_request(RoutineRunProgressRequest):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.RoutineRun.t}on success{:error, Tesla.Env.t}on failure