View Source ShortcutApi.EpicsBehavior behaviour (shortcut_api_ex v1.0.5)

A behaviour for interacting with Shortcut Epics API endpoints.

This module defines the required callbacks for operations related to epics, including retrieving, creating, updating, deleting, and managing epic states and statistics. Implementations of this behaviour must provide the necessary logic to handle interactions with the Shortcut API.

All callbacks require a valid Shortcut API token.

Summary

Callbacks

create_epic(token, params)

@callback create_epic(token :: String.t(), params :: map()) ::
  {:ok, map()} | {:error, any()}

delete_epic(token, epic_id)

@callback delete_epic(token :: String.t(), epic_id :: pos_integer()) ::
  {:ok, map()} | {:error, any()}

get_epic(token, epic_id)

@callback get_epic(token :: String.t(), epic_id :: pos_integer()) ::
  {:ok, map()} | {:error, any()}

get_epic_state(token, state_id)

@callback get_epic_state(token :: String.t(), state_id :: pos_integer()) ::
  {:ok, map()} | {:error, any()}

get_epic_stats(token, epic_id)

@callback get_epic_stats(token :: String.t(), epic_id :: pos_integer()) ::
  {:ok, map()} | {:error, any()}

get_epic_workflow(token)

@callback get_epic_workflow(token :: String.t()) :: {:ok, map()} | {:error, any()}

list_epics(token)

@callback list_epics(token :: String.t()) :: {:ok, [map()]} | {:error, any()}

update_epic(token, epic_id, params)

@callback update_epic(token :: String.t(), epic_id :: pos_integer(), params :: map()) ::
  {:ok, map()} | {:error, any()}