Skip to content
This repository has been archived by the owner on Feb 9, 2018. It is now read-only.

Commit

Permalink
Allow cards to be unclosed (dearchived, sent to board)
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf authored and Luzifer committed Feb 25, 2016
1 parent a333cfd commit 4fa576e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions card.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,15 @@ func (c *Card) Archive() ([]byte, error) {
return c.client.Put("/cards/"+c.Id+"/closed", payload)
}

// SendToBoard will dearchive the card, or send the card to the board back from archive
// https://developers.trello.com/advanced-reference/card#put-1-cards-card-id-or-shortlink-closed
func (c *Card) SendToBoard() ([]byte, error) {
payload := url.Values{}
payload.Set("value", "false")

return c.client.Put("/cards/"+c.Id+"/closed", payload)
}

// MoveToList will move the card to another list
// https://developers.trello.com/advanced-reference/card#put-1-cards-card-id-or-shortlink-idlist
func (c *Card) MoveToList(list *List) ([]byte, error) {
Expand Down

0 comments on commit 4fa576e

Please sign in to comment.