0.2.58 - Requests module
This commit is contained in:
@@ -221,3 +221,16 @@ func (c *Client) do(req *http.Request, out any) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Movies returns Radarr's whole catalogue.
|
||||
//
|
||||
// The request page needs the current state of every title a viewer has ever asked for, and
|
||||
// asking Radarr per title would be one round trip per card. One catalogue read answers them
|
||||
// all; the caller caches it.
|
||||
func (c *Client) Movies(ctx context.Context) ([]Movie, error) {
|
||||
var movies []Movie
|
||||
if err := c.get(ctx, "/api/v3/movie", &movies); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return movies, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user