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

More simple card actions #1

Merged
merged 2 commits into from Feb 21, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Allow repositioning a card
  • Loading branch information
fiatjaf committed Feb 21, 2016
commit 255f8c64e97c806a32c3eb770751c6ca4ac18304
9 changes: 9 additions & 0 deletions card.go
Original file line number Diff line number Diff line change
@@ -197,3 +197,12 @@ func (c *Card) MoveToList(listId string) ([]byte, error) {

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

// MoveToPos will move card to the specified position
// https://developers.trello.com/advanced-reference/card#put-1-cards-card-id-or-shortlink-pos
func (c *Card) MoveToPos(pos string) ([]byte, error) {
payload := url.Values{}
payload.Set("value", pos)

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