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

Commit 2d205bc

Browse files
committed
Allow moving a card
1 parent ad6249f commit 2d205bc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

card.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,12 @@ func (c *Card) Archive() ([]byte, error) {
188188

189189
return c.client.Put("/cards/"+c.Id+"/closed", payload)
190190
}
191+
192+
// MoveToList will move the card to another list
193+
// https://developers.trello.com/advanced-reference/card#put-1-cards-card-id-or-shortlink-idlist
194+
func (c *Card) MoveToList(list *List) ([]byte, error) {
195+
payload := url.Values{}
196+
payload.Set("value", list.Id)
197+
198+
return c.client.Put("/cards/"+c.Id+"/idList", payload)
199+
}

0 commit comments

Comments
 (0)