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

Commit c1e9020

Browse files
fiatjafLuzifer
authored andcommitted
Allow repositioning a card
1 parent 7d05654 commit c1e9020

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
@@ -197,3 +197,12 @@ func (c *Card) MoveToList(list *List) ([]byte, error) {
197197

198198
return c.client.Put("/cards/"+c.Id+"/idList", payload)
199199
}
200+
201+
// MoveToPos will move card to the specified position
202+
// https://developers.trello.com/advanced-reference/card#put-1-cards-card-id-or-shortlink-pos
203+
func (c *Card) MoveToPos(pos string) ([]byte, error) {
204+
payload := url.Values{}
205+
payload.Set("value", pos)
206+
207+
return c.client.Put("/cards/"+c.Id+"/pos", payload)
208+
}

0 commit comments

Comments
 (0)