Documentation ¶
Index ¶
- Constants
- type Branch
- type Client
- func (c *Client) AddLabelToMultipleStories(ids []int64, params CreateLabelParams) error
- func (c *Client) CreateEpic(params CreateEpicParams) (*Epic, error)
- func (c *Client) GetMember(memberID string) (*Member, error)
- func (c *Client) ListEpics() ([]Epic, error)
- func (c *Client) ListMembers() ([]Member, error)
- func (c *Client) ListProjects() ([]*Project, error)
- func (c *Client) ListStoriesForProject(id string) ([]Story, error)
- func (c *Client) ListWorkflows() ([]Workflow, error)
- func (c *Client) StoriesCreate(params []CreateStoryParams) ([]*Story, error)
- func (c *Client) StoriesDelete(storyIds []int64) error
- func (c *Client) StoryArchive(storyId int64) (*Story, error)
- func (c *Client) StoryCreate(param CreateStoryParams) (*Story, error)
- func (c *Client) StoryDelete(storyId int64) error
- func (c *Client) StoryGet(storyId int64) (*Story, error)
- func (c *Client) UpdateMultipleStories(params UpdateMultipleStoriesParams) ([]*Story, error)
- type Comment
- type Commit
- type CreateCommentParams
- type CreateEpicParams
- type CreateExternalTicketParams
- type CreateLabelParams
- type CreateStoryCommentParams
- type CreateStoryLinkParams
- type CreateStoryParams
- type CreateTaskParams
- type DeleteStoriesParam
- type Epic
- type EpicState
- type EpicStats
- type EpicWorkflow
- type ErrorResponse
- type ExternalTicket
- type File
- type Identity
- type Label
- type LinkedFile
- type Member
- type Profile
- type Project
- type PullRequest
- type Story
- type StoryLink
- type Task
- type UpdateMultipleStoriesParams
- type UpdateStoryParams
- type Workflow
- type WorkflowState
Constants ¶
View Source
const ( StoryTypeFeature string = "feature" StoryTypeBug string = "bug" StoryTypeChore string = "chore" )
View Source
const DefaultURL = "https://api.app.shortcut.com/api/v3"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Branch ¶
type Branch struct { CreatedAt string `json:"created_at"` Deleted bool `json:"deleted"` EntityType string `json:"entity_type"` ID int64 `json:"id"` MergedBranchIDs []int64 `json:"merged_branch_ids"` Name string `json:"name"` Persistent bool `json:"persistent"` PullRequests []PullRequest `json:"pull_requests"` RepositoryID int64 `json:"repository_id"` UpdatedAt string `json:"updated_at"` URL string `json:"url"` }
type Client ¶
func (*Client) AddLabelToMultipleStories ¶
func (c *Client) AddLabelToMultipleStories(ids []int64, params CreateLabelParams) error
func (*Client) CreateEpic ¶
func (c *Client) CreateEpic(params CreateEpicParams) (*Epic, error)
func (*Client) ListMembers ¶
func (*Client) ListProjects ¶
func (*Client) ListStoriesForProject ¶
func (*Client) ListWorkflows ¶
func (*Client) StoriesCreate ¶
func (c *Client) StoriesCreate(params []CreateStoryParams) ([]*Story, error)
func (*Client) StoriesDelete ¶
func (*Client) StoryCreate ¶
func (c *Client) StoryCreate(param CreateStoryParams) (*Story, error)
func (*Client) StoryDelete ¶
func (*Client) UpdateMultipleStories ¶
func (c *Client) UpdateMultipleStories(params UpdateMultipleStoriesParams) ([]*Story, error)
type Comment ¶
type Comment struct { AppURL string `json:"app_url"` AuthorID string `json:"author_id"` Comments []Comment `json:"comments"` CreatedAt string `json:"created_at"` Deleted bool `json:"deleted"` EntityType string `json:"entity_type"` ExternalID string `json:"external_id"` GroupMentionIDs []string `json:"group_mention_ids"` ID int64 `json:"id"` MemberMentionIDs []string `json:"member_mention_ids"` MentionIDs []string `json:"mention_ids"` Text string `json:"text"` UpdatedAt string `json:"updated_at"` }
type Commit ¶
type Commit struct { AuthorEmail string `json:"author_email"` AuthorID string `json:"author_id"` AuthorIdentity Identity `json:"author_identity"` CreatedAt string `json:"created_at"` EntityType string `json:"entity_type"` Hash string `json:"hash"` ID int64 `json:"id"` MergedBranchIDs []int64 `json:"merged_branch_ids"` Message string `json:"message"` RepositoryID int64 `json:"repository_id"` Timestamp string `json:"timestamp"` UpdatedAt string `json:"updated_at"` URL string `json:"url"` }
type CreateCommentParams ¶
type CreateEpicParams ¶
type CreateEpicParams struct { // Required Name string `json:"name"` Description string `json:"description"` RequestedByID string `json:"requested_by_id"` // Optional CompletedAtOverride *time.Time `json:"completed_at_override,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` Deadline *time.Time `json:"deadline,omitempty"` EpicStateID int64 `json:"epic_state_id,omitempty"` ExternalID string `json:"external_id,omitempty"` FollowerIDs []string `json:"follower_ids,omitempty"` Labels []CreateLabelParams `json:"labels,omitempty"` MilestoneID int64 `json:"milestone_id,omitempty"` OwnerIDs []string `json:"owner_ids,omitempty"` PlannedStartDate *time.Time `json:"planned_start_date,omitempty"` StartedAtOverride *time.Time `json:"started_at_override,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` }
type CreateLabelParams ¶
type CreateStoryLinkParams ¶
type CreateStoryParams ¶
type CreateStoryParams struct { // Required Name string `json:"name"` Description string `json:"description"` ProjectID int64 `json:"project_id"` Archived bool `json:"archived"` StoryType string `json:"story_type"` // Optional Comments []CreateStoryCommentParams `json:"comments,omitempty"` CompletedAtOverride *time.Time `json:"completed_at_override,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"` Deadline *time.Time `json:"deadline,omitempty"` EpicID int64 `json:"epic_id,omitempty"` Estimate int64 `json:"estimate,omitempty"` ExternalID string `json:"external_id,omitempty"` ExternalTickets []CreateExternalTicketParams `json:"external_tickets,omitempty"` FileIDs []int64 `json:"file_ids,omitempty"` FollowerIDs []string `json:"follower_ids,omitempty"` IterationID int64 `json:"iteration_id,omitempty"` Labels []CreateLabelParams `json:"labels,omitempty"` LinkedFileIDs []int64 `json:"linked_file_ids,omitempty"` OwnerIDs []string `json:"owner_ids,omitempty"` RequestedByID string `json:"requested_by_id,omitempty"` StartedAtOverride *time.Time `json:"started_at_override,omitempty"` StoryLinks []CreateStoryLinkParams `json:"story_links,omitempty"` Tasks []CreateTaskParams `json:"tasks,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` WorkflowStateID int64 `json:"workflow_state_id,omitempty"` }
type CreateTaskParams ¶
type CreateTaskParams struct { // Required Complete bool `json:"complete"` Description string `json:"description"` // Optional CreatedAt *time.Time `json:"created_at,omitempty"` ExternalID string `json:"external_id,omitempty"` OwnerIDs []string `json:"owner_ids,omitempty"` UpdatedAt *time.Time `json:"updated_at,omitempty"` }
type DeleteStoriesParam ¶
type DeleteStoriesParam struct {
StoryIds []int64 `json:"story_ids"`
}
type Epic ¶
type Epic struct { AppURL string `json:"app_url"` Archived bool `json:"archived"` Comments []Comment `json:"comments"` Completed bool `json:"completed"` CompletedAt time.Time `json:"completed_at"` CompletedAtOverride time.Time `json:"completed_at_override"` Deadline time.Time `json:"deadline"` Description string `json:"description"` EntityType string `json:"entity_type"` EpicStateID int64 `json:"epic_state_id"` ExternalID string `json:"external_id"` ExternalTickets []ExternalTicket `json:"external_tickets"` FollowerIDs []string `json:"follower_ids"` GroupMentionIDs []string `json:"group_mention_ids"` ID int64 `json:"id"` Labels []Label `json:"labels"` MemberMentionIDs []string `json:"member_mention_ids"` MentionIDs []string `json:"mention_ids"` MilestoneID int64 `json:"milestone_id"` Name string `json:"name"` OwnerIDs []string `json:"owner_ids"` PlannedStartDate time.Time `json:"planned_start_date"` Position int64 `json:"position"` ProjectIDs []int64 `json:"project_ids"` RequestByID string `json:"requested_by_id"` Started bool `json:"started"` StartedAt time.Time `json:"started_at"` StartedAtOverride time.Time `json:"started_at_override"` State string `json:"state"` // Deprecated Stats EpicStats `json:"stats"` UpdatedAt string `json:"updated_at"` CreatedAt time.Time `json:"created_at"` }
type EpicState ¶
type EpicState struct { ID int64 `json:"id"` Name string `json:"name"` Description string `json:"description"` EntityType string `json:"entity_type"` Type string `json:"type"` Color string `json:"color"` Position int64 `json:"position"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
type EpicStats ¶
type EpicStats struct { AverageCycleTime int64 `json:"average_cycle_time"` AverageLeadTime int64 `json:"average_lead_time"` LastStoryUpdate time.Time `json:"last_story_update"` NumPoints int64 `json:"num_points"` NumPointsDone int64 `json:"num_points_done"` NumPointsStarted int64 `json:"num_points_started"` NumPointsUnstarted int64 `json:"num_points_unstarted"` NumRelatedDocuments int64 `json:"num_related_documents"` NumStoriesDone int64 `json:"num_stories_done"` NumStoriesStarted int64 `json:"num_stories_started"` NumStoriesUnestimated int64 `json:"num_stories_unestimated"` NumStoriesUnstarted int64 `json:"num_stories_unstarted"` }
type EpicWorkflow ¶
type ErrorResponse ¶
type ExternalTicket ¶
type File ¶
type File struct { ContentType string `json:"content_type"` CreatedAt string `json:"created_at"` Description string `json:"description"` EntityType string `json:"entity_type"` ExternalID string `json:"external_id"` Filename string `json:"filename"` GroupMentionIDs []string `json:"group_mention_ids"` ID int64 `json:"id"` MemberMentionIDs []string `json:"member_mention_ids"` MentionIDs []string `json:"mention_ids"` Name string `json:"name"` Size int64 `json:"size"` StoryIDs []int64 `json:"story_ids"` ThumbnailURL string `json:"thumbnail_url"` UpdatedAt string `json:"updated_at"` UploaderID string `json:"uploader_id"` URL string `json:"url"` }
type Label ¶
type Label struct { AppURL string `json:"app_url"` Archived bool `json:"archived"` Color string `json:"color"` CreatedAt string `json:"created_at"` Description string `json:"description"` EntityType string `json:"entity_type"` ExternalID string `json:"external_id"` ID int64 `json:"id"` Name string `json:"name"` Stats struct { NumEpics int64 `json:"num_epics"` NumPointsCompleted int64 `json:"num_points_completed"` NumPointsInProgress int64 `json:"num_points_in_progress"` NumPointsTotal int64 `json:"num_points_total"` NumRelatedDocuments int64 `json:"num_related_documents"` NumStoriesCompleted int64 `json:"num_stories_completed"` NumStoriesInProgress int64 `json:"num_stories_in_progress"` NumStoriesTotal int64 `json:"num_stories_total"` NumStoriesUnestimated int64 `json:"num_stories_unestimated"` } `json:"stats"` UpdatedAt string `json:"updated_at"` }
type LinkedFile ¶
type LinkedFile struct { ContentType string `json:"content_type"` CreatedAt string `json:"created_at"` Description string `json:"description"` EntityType string `json:"entity_type"` GroupMentionIDs []string `json:"group_mention_ids"` ID int64 `json:"id"` MemberMentionIDs []string `json:"member_mention_ids"` MentionIDs []string `json:"mention_ids"` Name string `json:"name"` Size int64 `json:"size"` StoryIDs []int64 `json:"story_ids"` ThumbnailURL string `json:"thumbnail_url"` Type string `json:"type"` UpdatedAt string `json:"updated_at"` UploaderID string `json:"uploader_id"` URL string `json:"url"` }
type Project ¶
type Project struct { Abbreviation string `json:"abbreviation"` AppURL string `json:"app_url"` Archived bool `json:"archived"` Color string `json:"color"` CreatedAt string `json:"created_at"` DaysToThermometer int64 `json:"days_to_thermometer"` Description string `json:"description"` EntityType string `json:"entity_type"` ExternalID string `json:"external_id"` FollowerIDs []string `json:"follower_ids"` ID int64 `json:"id"` IterationLength int64 `json:"iteration_length"` Name string `json:"name"` ShowThermometer bool `json:"show_thermometer"` StartTime string `json:"start_time"` Stats struct { NumPoints int64 `json:"num_points"` NumRelatedDocuments int64 `json:"num_related_documents"` NumStories int64 `json:"num_stories"` } `json:"stats"` TeamID int64 `json:"team_id"` UpdatedAt string `json:"updated_at"` }
type PullRequest ¶
type PullRequest struct { BranchID int64 `json:"branch_id"` BranchName string `json:"branch_name"` Closed bool `json:"closed"` CreatedAt string `json:"created_at"` EntityType string `json:"entity_type"` ID int64 `json:"id"` NumAdded int64 `json:"num_added"` NumCommits int64 `json:"num_commits"` NumModified int64 `json:"num_modified"` NumRemoved int64 `json:"num_removed"` Number int64 `json:"number"` TargetBranchID int64 `json:"target_branch_id"` TargetBranchName string `json:"target_branch_name"` Title string `json:"title"` UpdatedAt string `json:"updated_at"` URL string `json:"url"` }
type Story ¶
type Story struct { AppURL string `json:"app_url"` Archived bool `json:"archived"` Blocked bool `json:"blocked"` Blocker bool `json:"blocker"` Branches []Branch `json:"branches"` Comments []Comment `json:"comments"` Commits []Commit `json:"commits"` Completed bool `json:"completed"` CompletedAt string `json:"completed_at"` CompletedAtOverride string `json:"completed_at_override"` CreatedAt string `json:"created_at"` CycleTime int64 `json:"cycle_time"` Deadline string `json:"deadline"` Description string `json:"description"` EntityType string `json:"entity_type"` EpicID int64 `json:"epic_id"` Estimate int64 `json:"estimate"` ExternalID string `json:"external_id"` ExternalTickets []ExternalTicket `json:"external_tickets"` Files []File `json:"files"` FollowerIDs []string `json:"follower_ids"` GroupMentionIDs []string `json:"group_mention_ids"` ID int64 `json:"id"` IterationID int64 `json:"iteration_id"` Labels []Label `json:"label"` LeadTime int64 `json:"lead_time"` LinkedFiles []LinkedFile `json:"linked_files"` MemberMentionIDs []string `json:"member_mention_ids"` MentionIDs []string `json:"mention_ids"` MovedAt string `json:"moved_at"` Name string `json:"name"` OwnerIDs []string `json:"owner_ids"` Position int64 `json:"position"` PreviousIterationIDs []int64 `json:"previous_iteration_ids"` ProjectID int64 `json:"project_id"` PullRequests []PullRequest `json:"pull_requests"` RequestedByID string `json:"requested_by_id"` Started bool `json:"started"` StartedAt string `json:"started_at"` StartedAtOverride string `json:"started_at_override"` Stats struct { NumRelatedDocuments int64 `json:"num_related_documents"` } `json:"stats"` StoryLinks []StoryLink `json:"story_links"` StoryType string `json:"story_type"` Tasks []Task `json:"tasks"` UpdatedAt string `json:"updated_at"` WorkflowStateID int64 `json:"workflow_state_id"` }
type Task ¶
type Task struct { Complete bool `json:"complete"` CompletedAt string `json:"completed_at"` CreatedAt string `json:"created_at"` Description string `json:"description"` EntityType string `json:"entity_type"` ExternalID string `json:"external_id"` GroupMentionIDs []string `json:"group_mention_ids"` ID int64 `json:"id"` MemberMentionIDs []string `json:"member_mention_ids"` MentionIDs []string `json:"mention_ids"` OwnerIDs []string `json:"owner_ids"` Position int64 `json:"position"` StoryID int64 `json:"story_id"` UpdatedAt string `json:"updated_at"` }
type UpdateMultipleStoriesParams ¶
type UpdateMultipleStoriesParams struct { AfterId int64 `json:"after_id,omitempty"` Archived bool `json:"archived,omitempty"` BeforeId int64 `json:"before_id,omitempty"` Deadline *time.Time `json:"deadline,omitempty"` EpicId int64 `json:"epic_id,omitempty"` Estimate int64 `json:"estimate,omitempty"` ExternalLinks []string `json:"external_links,omitempty"` FollowerIdsAdd []string `json:"follower_ids_add,omitempty"` FollowerIdsRemove []string `json:"follower_ids_remove,omitempty"` GroupId string `json:"group_id,omitempty"` IterationId int64 `json:"iteration_id,omitempty"` LabelsAdd []CreateLabelParams `json:"labels_add,omitempty"` LabelsRemove []CreateLabelParams `json:"labels_remove,omitempty"` MoveTo string `json:"move_to,omitempty"` OwnerIdsAdd []string `json:"owner_ids_add,omitempty"` OwnerIdsRemove []string `json:"owner_ids_remove,omitempty"` ProjectId int64 `json:"project_id,omitempty"` RequestedById string `json:"requested_by_id,omitempty"` StoryIds []int64 `json:"story_ids"` // Required StoryType string `json:"story_type,omitempty"` WorkflowStateId int64 `json:"workflow_state_id,omitempty"` }
type UpdateStoryParams ¶
type UpdateStoryParams struct { AfterId int64 `json:"after_id,omitempty"` Archived bool `json:"archived,omitempty"` BeforeId int64 `json:"before_id,omitempty"` BranchIds []int64 `json:"branch_ids,omitempty"` CommitIds []int64 `json:"commit_ids,omitempty"` CompletedAtOverride *time.Time `json:"completed_at_override,omitempty"` Deadline *time.Time `json:"deadline,omitempty"` Description string `json:"description,omitempty"` EpicId int64 `json:"epic_id,omitempty"` Estimate int64 `json:"estimate,omitempty"` ExternalLinks []string `json:"external_links,omitempty"` FileIds []int64 `json:"file_ids,omitempty"` FollowerIds []string `json:"follower_ids,omitempty"` GroupId string `json:"group_id,omitempty"` IterationId int64 `json:"iteration_id,omitempty"` Labels []CreateLabelParams `json:"labels,omitempty"` LinkedFileIds []int64 `json:"linked_file_ids,omitempty"` MoveTo string `json:"move_to,omitempty"` Name string `json:"name,omitempty"` OwnerIds []string `json:"owner_ids,omitempty"` ProjectId int64 `json:"project_id,omitempty"` PullRequestIds []int64 `json:"pull_request_ids,omitempty"` RequestedById string `json:"requested_by_id,omitempty"` StartedAtOverride *time.Time `json:"started_at_override,omitempty"` StoryType string `json:"story_type,omitempty"` WorkflowStateId int64 `json:"workflow_state_id,omitempty"` }
type Workflow ¶
type Workflow struct { // Like EpicWorkflow ID int64 `json:"id"` Name string `json:"name"` Description string `json:"description"` EntityType string `json:"entity_type"` DefaultStateId int64 `json:"default_state_id"` States []WorkflowState `json:"states"` AutoAssignOwner bool `json:"auto_assign_owner"` ProjectIds []int64 `json:"project_ids"` TeamId int64 `json:"team_id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Click to show internal directories.
Click to hide internal directories.