Skip to content
This repository was archived by the owner on Apr 2, 2022. It is now read-only.

Commit bac373a

Browse files
fiatjafLuzifer
authored andcommitted
Allow cards to be unclosed (dearchived, sent to board)
1 parent c1e9020 commit bac373a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

card.go

+9
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,15 @@ func (c *Card) Archive() ([]byte, error) {
189189
return c.client.Put("/cards/"+c.Id+"/closed", payload)
190190
}
191191

192+
// SendToBoard will dearchive the card, or send the card to the board back from archive
193+
// https://developers.trello.com/advanced-reference/card#put-1-cards-card-id-or-shortlink-closed
194+
func (c *Card) SendToBoard() ([]byte, error) {
195+
payload := url.Values{}
196+
payload.Set("value", "false")
197+
198+
return c.client.Put("/cards/"+c.Id+"/closed", payload)
199+
}
200+
192201
// MoveToList will move the card to another list
193202
// https://developers.trello.com/advanced-reference/card#put-1-cards-card-id-or-shortlink-idlist
194203
func (c *Card) MoveToList(list *List) ([]byte, error) {

0 commit comments

Comments
 (0)