tricycle / morty-api / MortyAPI.Commands

Provides commands and command parameters for making API calls.


type alias ApproachParameters a =
{ mortyApiToken : String
, mortyHost : String
, msgType : RemoteData.WebData MortyAPI.Types.TaskApproach -> a 
}

Parameters required to POST a new Task Approach


type alias CurrentUserParameters a =
{ mortyApiToken : String
, mortyHost : String
, msgType : RemoteData.WebData MortyAPI.Types.User -> a 
}

Parameters required to retrieve the current user


type alias KanbanLanesForTeamParameters a =
{ mortyApiToken : String
, mortyHost : String
, teamId : Basics.Int
, msgType : RemoteData.WebData MortyAPI.Types.KanbanLanesSuccessResponse -> a 
}

Parameters required to retrieve the kanban board for a full team


type alias KanbanLanesForUserParameters a =
{ mortyApiToken : String
, mortyHost : String
, userId : Basics.Int
, msgType : RemoteData.WebData MortyAPI.Types.KanbanLanesSuccessResponse -> a 
}

Parameters required to retrieve the kanban board for a single user


type alias TasksParameters a =
{ mortyApiToken : String
, mortyHost : String
, ownerType : Maybe String
, ownerId : Maybe Basics.Int
, taskScope : Maybe String
, taskScopeParam : Maybe String
, msgType : RemoteData.WebData (List MortyAPI.Types.Task) -> a 
}

Parameters required to retrieve task matching owner and scope


type alias TaskParameters a =
{ mortyApiToken : String
, mortyHost : String
, taskId : Basics.Int
, msgType : RemoteData.WebData MortyAPI.Types.Task -> a 
}

Parameters required to retrieve a task


type alias TeamsParameters a =
{ mortyApiToken : String
, mortyHost : String
, msgType : RemoteData.WebData MortyAPI.Types.TeamsSuccessResponse -> a 
}

Parameters required to retrieve a list of teams

getCurrentUserCommand : CurrentUserParameters a -> Platform.Cmd.Cmd a

Gets the current user from the API

getKanbanLanesForTeam : KanbanLanesForTeamParameters a -> Platform.Cmd.Cmd a

Retrieves all kanban lanes for a team

getKanbanLanesForUser : KanbanLanesForUserParameters a -> Platform.Cmd.Cmd a

Retrieves all kanban lanes for a user

getTaskCommand : TaskParameters a -> Platform.Cmd.Cmd a

Gets a task from the API

getTasksCommand : TasksParameters a -> Platform.Cmd.Cmd a

Gets a list of tasks matching the filter criteria from the API

getTeams : TeamsParameters a -> Platform.Cmd.Cmd a

Retrieves all teams and their members

postTaskApproachCommand : ApproachParameters a -> MortyAPI.Types.TaskApproach -> Platform.Cmd.Cmd a

POSTs a new task approach to the API

putTaskUpdateCommand : TaskParameters a -> MortyAPI.Types.Task -> Platform.Cmd.Cmd a

Updates the properties of a task using a PUT call to the API