From 95b8ab702708538ccaf26efd141b448148ac6d6d Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Mon, 28 Feb 2022 13:06:16 +0530 Subject: documented manga package and fixed errors in anime README --- user/manga/update_mangalist.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'user/manga/update_mangalist.go') diff --git a/user/manga/update_mangalist.go b/user/manga/update_mangalist.go index cac27e8..423a919 100644 --- a/user/manga/update_mangalist.go +++ b/user/manga/update_mangalist.go @@ -45,6 +45,18 @@ func (c Client)SetStatus(id int, status string) (serverResponse, error) { return c.putRequestHandler(endpoint, params), nil } +// update just a manga's num of volumes read +func (c Client)SetVolumesRead(id int, volumes int) (serverResponse, error) { + endpoint := endpointGenerator(id) + + // data to be sent to the server + params := url.Values{} + params.Set("num_volumes_read", strconv.Itoa(volumes)) + + // make API request + return c.putRequestHandler(endpoint, params), nil +} + // update just a manga's num of chapters read func (c Client)SetChaptersRead(id int, chapters int) (serverResponse, error) { endpoint := endpointGenerator(id) -- cgit v1.2.3