Add streaming list support.

This commit is contained in:
Ben Lubar 2019-04-26 20:53:58 -05:00
parent a7fb8018e1
commit ae1b5f8629
No known key found for this signature in database
GPG key ID: 92939677AB59EDA4
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)
}