aboutsummaryrefslogtreecommitdiff
path: root/user/manga/update_mangalist.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@protonmail.ch>2022-02-28 13:06:16 +0530
committerVidhu Kant Sharma <vidhukant@protonmail.ch>2022-02-28 13:06:16 +0530
commit95b8ab702708538ccaf26efd141b448148ac6d6d (patch)
tree62d41395d8d45f9045c64974f7dcf7c15b7755ef /user/manga/update_mangalist.go
parent2bf5302f9a653f46f7932329fd03aa3688afc35b (diff)
documented manga package and fixed errors in anime README
Diffstat (limited to 'user/manga/update_mangalist.go')
-rw-r--r--user/manga/update_mangalist.go12
1 files changed, 12 insertions, 0 deletions
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)