trello icon indicating copy to clipboard operation
trello copied to clipboard

Cards lack GetList() method

Open fdcds opened this issue 4 years ago • 1 comments

Card has a List field, but no Card.GetList() method to fill it.

The information does not appear to be returned by the Trello API for calls to List.GetCards(), and cannot be optionally requested through it, since https://developer.atlassian.com/cloud/trello/rest/#api-lists-id-cards-get does not describe a fields argument (and it is not respected by the API).

fdcds avatar Jun 11 '20 17:06 fdcds

Card shouldn't have "getList()" as that is a method on Board (and Client). However, finding the parent object can probably be useful, so I added it in that PR #77 when it was available. There was also a method or two where list was not available. I am not sure why you would want Board.GetCards, but in that case, we may need to come up with a way to get a map of lists map[string]*List (lists[IDList] = *List), cause if you are retrieving all the cards on a board (not sure why that would be useful), we don't want to "getList(IDList)" for every card. Feel free to test out my PR and let me know if that fills your need.

~tommy

TJM avatar Nov 02 '20 15:11 TJM