diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-08-06 09:58:16 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-08-06 09:58:16 +0530 |
commit | 3d23ed955d11651bd9bacda02070b8d13b6922a1 (patch) | |
tree | bd059a01f9dbefbbf49471d64d8082feccae76da /mal/episodes.go | |
parent | da51d5d32c6a7795278539eaf994975c7776e296 (diff) |
added volumes command
Diffstat (limited to 'mal/episodes.go')
-rw-r--r-- | mal/episodes.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mal/episodes.go b/mal/episodes.go index 43b69c0..0940af5 100644 --- a/mal/episodes.go +++ b/mal/episodes.go @@ -43,3 +43,12 @@ func SetChapters(mangaId, prevValue int, ch string) m.UpdateResponse { } return res } + +func SetVolumes(mangaId, prevValue int, vol string) m.UpdateResponse { + res, err := userMangaClient.SetVolumesRead(mangaId, util.ParseNumeric(vol, prevValue)) + if err != nil { + fmt.Println("MyAnimeList returned error while updating volumes:", err) + os.Exit(1) + } + return res +} |