From 086b9853837f29a3f54ec3fec687fbe30e2d296e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Sun, 1 Mar 2020 19:36:48 -0800 Subject: [PATCH] Add API Client function to refresh all feeds --- client/client.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/client/client.go b/client/client.go index e2be7278..a3f22ed0 100644 --- a/client/client.go +++ b/client/client.go @@ -320,7 +320,17 @@ func (c *Client) UpdateFeed(feedID int64, feedChanges *FeedModification) (*Feed, return f, nil } -// RefreshFeed refresh a feed. +// RefreshAllFeeds refreshes all feeds. +func (c *Client) RefreshAllFeeds() error { + body, err := c.request.Put(fmt.Sprintf("/v1/feeds/refresh"), nil) + if err != nil { + return err + } + body.Close() + return nil +} + +// RefreshFeed refreshes a feed. func (c *Client) RefreshFeed(feedID int64) error { body, err := c.request.Put(fmt.Sprintf("/v1/feeds/%d/refresh", feedID), nil) if err != nil {