Spatio.Api.Apps (spatio_sdk v0.0.2)
API calls for all endpoints tagged Apps.
Summary
Functions
Register a prototype app (project_path is the on-disk root).
Delete an app.
Delete one file inside the app's project directory.
Fetch an app.
List files inside the app's project directory.
List the caller's prototype apps.
Read one file inside the app's project directory. Path is traversal-checked; returns 400 if it escapes project root.
Update an app.
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):workspace(String.t):request_body(%{optional(String.t) => any()}):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):workspace(String.t):id(String.t):opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):workspace(String.t):id(String.t):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):workspace(String.t):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):workspace(String.t):id(String.t):request_body(%{optional(String.t) => any()}):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
Write one file inside the app's project directory.
Functions
@spec create_app(Tesla.Env.client(), Spatio.Model.CreateAppRequest.t(), keyword()) :: {:ok, Spatio.Model.App.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Register a prototype app (project_path is the on-disk root).
Parameters
connection(Spatio.Connection): Connection to servercreate_app_request(CreateAppRequest):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.App.t}on success{:error, Tesla.Env.t}on failure
@spec delete_app(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Delete an app.
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 delete_app_file(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Delete one file inside the app's project directory.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):path(String.t):opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec get_app(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.App.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Fetch an app.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.App.t}on success{:error, Tesla.Env.t}on failure
@spec list_app_files(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Spatio.Model.AppFileListResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List files inside the app's project directory.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):opts(keyword): Optional parameters:path(String.t):
Returns
{:ok, Spatio.Model.AppFileListResponse.t}on success{:error, Tesla.Env.t}on failure
@spec list_apps( Tesla.Env.client(), keyword() ) :: {:ok, Spatio.Model.AppListResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
List the caller's prototype apps.
Parameters
connection(Spatio.Connection): Connection to serveropts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.AppListResponse.t}on success{:error, Tesla.Env.t}on failure
@spec read_app_file(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, Spatio.Model.AppFileContentResponse.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Read one file inside the app's project directory. Path is traversal-checked; returns 400 if it escapes project root.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):path(String.t):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.AppFileContentResponse.t}on success{:error, Tesla.Env.t}on failure
@spec update_app( Tesla.Env.client(), String.t(), Spatio.Model.UpdateAppRequest.t(), keyword() ) :: {:ok, Spatio.Model.App.t()} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Update an app.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):update_app_request(UpdateAppRequest):opts(keyword): Optional parameters
Returns
{:ok, Spatio.Model.App.t}on success{:error, Tesla.Env.t}on failure
@spec workspace_create_app( Tesla.Env.client(), String.t(), String.t(), %{optional(String.t()) => any()}, keyword() ) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):workspace(String.t):request_body(%{optional(String.t) => any()}):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec workspace_delete_app( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):workspace(String.t):id(String.t):opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec workspace_get_app( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):workspace(String.t):id(String.t):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec workspace_list_apps(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):workspace(String.t):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec workspace_update_app( Tesla.Env.client(), String.t(), String.t(), String.t(), %{optional(String.t()) => any()}, keyword() ) :: {:ok, %{optional(String.t()) => any()}} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Parameters
connection(Spatio.Connection): Connection to serverorg(String.t):workspace(String.t):id(String.t):request_body(%{optional(String.t) => any()}):opts(keyword): Optional parameters
Returns
{:ok, %{}}on success{:error, Tesla.Env.t}on failure
@spec write_app_file( Tesla.Env.client(), String.t(), Spatio.Model.WriteAppFileRequest.t(), keyword() ) :: {:ok, nil} | {:ok, Spatio.Model.ApiError.t()} | {:error, Tesla.Env.t()}
Write one file inside the app's project directory.
Parameters
connection(Spatio.Connection): Connection to serverid(String.t):write_app_file_request(WriteAppFileRequest):opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure