Skip to content

Commit

Permalink
Add method to get all card attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
kolaente committed Dec 16, 2020
1 parent 4e5d614 commit 5c4ef79
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions card.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,13 @@ func (c *Card) AddURLAttachment(attachment *Attachment, extraArgs ...Arguments)

}

// GetAttachments returns all attachments a card has
func (c *Card) GetAttachments(args Arguments) (attachments []*Attachment, err error) {
path := fmt.Sprintf("cards/%s/attachments", c.ID)
c.client.Get(path, args, &attachments)
return
}

// GetParentCard retrieves the originating Card if the Card was created
// from a copy of another Card. Returns an error only when a low-level failure occurred.
// If this Card has no parent, a nil card and nil error are returned. In other words, the
Expand Down

0 comments on commit 5c4ef79

Please sign in to comment.