lib/spatio/api/navigation.ex

# NOTE: This file is auto generated by OpenAPI Generator 7.22.0 (https://openapi-generator.tech).
# Do not edit this file manually.

defmodule Spatio.Api.Navigation do
  @moduledoc """
  API calls for all endpoints tagged `Navigation`.
  """

  alias Spatio.Connection
  import Spatio.RequestBuilder

  @doc """
  Sidebar/navigation tree for the renderer.

  ### Parameters

  - `connection` (Spatio.Connection): Connection to server
  - `opts` (keyword): Optional parameters

  ### Returns

  - `{:ok, %{}}` on success
  - `{:error, Tesla.Env.t}` on failure
  """
  @spec get_navigation(Tesla.Env.client, keyword()) :: {:ok, %{optional(String.t) => any()}} | {:ok, Spatio.Model.ApiError.t} | {:error, Tesla.Env.t}
  def get_navigation(connection, _opts \\ []) do
    request =
      %{}
      |> method(:get)
      |> url("/v1/navigation")
      |> Enum.into([])

    connection
    |> Connection.request(request)
    |> evaluate_response([
      {200, %{}},
      {401, Spatio.Model.ApiError}
    ])
  end
end