Add streaming list support.

This commit is contained in:
Ben Lubar 2019-04-26 20:53:58 -05:00 committed by mattn
parent 6f05c48bf6
commit 3e2bdc63c7
2 changed files with 13 additions and 0 deletions

View file

@ -156,3 +156,11 @@ func (c *Client) StreamingHashtag(ctx context.Context, tag string, isLocal bool)
return c.streaming(ctx, p, params)
}
// StreamingList return channel to read events on a list.
func (c *Client) StreamingList(ctx context.Context, id ID) (chan Event, error) {
params := url.Values{}
params.Set("list", string(id))
return c.streaming(ctx, "list", params)
}