aboutsummaryrefslogtreecommitdiff
path: root/mal/status.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-06-15 12:59:22 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-06-15 12:59:22 +0530
commitab3db8a4ca89293ce0928177e8845d622f13755f (patch)
treee5331856b39b43cfea422f806aa046b0925e92e4 /mal/status.go
parent5eb7a3cd41826fccdc432d049dd85a31b4b56073 (diff)
added pretty template for TextInput
Diffstat (limited to 'mal/status.go')
-rw-r--r--mal/status.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/mal/status.go b/mal/status.go
index 422a838..1e11106 100644
--- a/mal/status.go
+++ b/mal/status.go
@@ -23,14 +23,26 @@ import (
"os"
)
-func SetStatus(animeId int, status string) {
+func SetAnimeStatus(animeId int, status string) {
resp, err := userAnimeClient.SetStatus(animeId, status)
if err != nil {
fmt.Println("Error while parsing status:", err.Error())
os.Exit(1)
}
if resp.Error != "" {
- fmt.Println("MyAnimeList reported error on SetStatus", resp.Error, resp.Message)
+ fmt.Println("MyAnimeList reported error on setting anime status", resp.Error, resp.Message)
+ os.Exit(1)
+ }
+}
+
+func SetMangaStatus(mangaId int, status string) {
+ resp, err := userMangaClient.SetStatus(mangaId, status)
+ if err != nil {
+ fmt.Println("Error while parsing status:", err.Error())
+ os.Exit(1)
+ }
+ if resp.Error != "" {
+ fmt.Println("MyAnimeList reported error on setting manga status", resp.Error, resp.Message)
os.Exit(1)
}
}