View Source BaserowEx.Workspaces.ListWorkspaces (baserow_ex v0.1.0)
This module is responsible for listing all workspaces of an authorized user, and will map them into a list of maps containing id and name
Summary
Functions
this function receives a BaserowEx client, and will make the call to the endpoint that lists the workspaces, managing the token session if necessary.
Functions
@spec call(BaserowEx.BaserowClient.Client.t(), Keyword.t()) :: {:ok, BaserowEx.BaserowClient.Client.t(), [BaserowEx.Workspaces.ListWorkspaces.ResponseParams.t()]} | {:error, :unknown_error}
this function receives a BaserowEx client, and will make the call to the endpoint that lists the workspaces, managing the token session if necessary.
the return will be in the standard format of this library:
the client returned in the triple tuple must be used by subsequent calls from the application, or even by other calls that are not from this module, this will guarantee session control
Example
iex> BaserowEx.Workspaces.ListWorkspaces.call(client)
{:ok, BaserowClient.Client.t(), [%ResponseParams{id: 0, name: "workspace_one"}]