diff --git a/list.go b/list.go index 2c2aff7..87543c3 100644 --- a/list.go +++ b/list.go @@ -29,6 +29,17 @@ type List struct { Pos float32 `json:"pos"` } +func (c *Client) List(listId string) (list *List, err error) { + body, err := c.Get("/lists/" + listId) + if err != nil { + return + } + + err = json.Unmarshal(body, &list) + list.client = c + return +} + func (l *List) Cards() (cards []Card, err error) { body, err := l.client.Get("/lists/" + l.Id + "/cards") if err != nil { @@ -41,3 +52,16 @@ func (l *List) Cards() (cards []Card, err error) { } return } + +func (l *List) Actions() (actions []Action, err error) { + body, err := l.client.Get("/lists/" + l.Id + "/actions") + if err != nil { + return + } + + err = json.Unmarshal(body, &actions) + for i := range actions { + actions[i].client = l.client + } + return +}