View Source ShortcutApi.Epics (shortcut_api_ex v1.0.5)
API wrapper for Shortcut Epics endpoints. See: https://developer.shortcut.com/api/rest/v3#Epics
All functions require a valid Shortcut API token.
Summary
Functions
Creates a new epic.
Deletes an epic.
Retrieves a single epic by ID.
Get details about a specific epic state.
Get statistics for a specific epic.
Get the epic workflow state.
Lists all epics.
Updates an existing epic.
Types
Functions
Creates a new epic.
Parameters
token
- Shortcut API tokenparams
- Map containing the epic parameters
Required params
:name
- Epic name:workflow_state_id
- The ID of the workflow state
Examples
iex> params = %{name: "New Epic", workflow_state_id: 123}
iex> ShortcutApi.Epics.create_epic("token", params)
{:ok, %{id: 12345, name: "New Epic"}}
Deletes an epic.
Parameters
token
- Shortcut API tokenepic_id
- The ID of the epic to delete
Examples
iex> ShortcutApi.Epics.delete_epic("token", 12345)
{:ok, %{}}
Retrieves a single epic by ID.
Parameters
token
- Shortcut API tokenepic_id
- The ID of the epic to retrieve
Examples
iex> ShortcutApi.Epics.get_epic("token", 12345)
{:ok, %{id: 12345, name: "Epic name"}}
@spec get_epic_state(token(), pos_integer()) :: response()
Get details about a specific epic state.
Parameters
token
- Shortcut API tokenstate_id
- The ID of the epic state to retrieve
Examples
iex> ShortcutApi.Epics.get_epic_state("token", 12345)
{:ok, %{id: 12345, name: "In Progress", ...}}
Get statistics for a specific epic.
Parameters
token
- Shortcut API tokenepic_id
- The ID of the epic to get stats for
Examples
iex> ShortcutApi.Epics.get_epic_stats("token", 12345)
{:ok, %{num_points: 10, num_stories: 5, ...}}
Get the epic workflow state.
Parameters
token
- Shortcut API token
Examples
iex> ShortcutApi.Epics.get_epic_workflow("token")
{:ok, %{states: [%{id: 123, name: "In Progress"}, ...]}}
Lists all epics.
Parameters
token
- Shortcut API token
Examples
iex> ShortcutApi.Epics.list_epics("token")
{:ok, [%{id: 12345, name: "Epic name"}, ...]}
Updates an existing epic.
Parameters
token
- Shortcut API tokenepic_id
- The ID of the epic to updateparams
- Map containing the update parameters
Examples
iex> params = %{name: "Updated Epic Name"}
iex> ShortcutApi.Epics.update_epic("token", 12345, params)
{:ok, %{id: 12345, name: "Updated Epic Name", ...}}