aboutsummaryrefslogtreecommitdiff
path: root/anime.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2023-08-15 15:42:00 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2023-08-15 15:42:00 +0530
commit33283bff8b1ae239036aeb1526ec3b7483767ed7 (patch)
tree3219f6a539acca526d2ea6c2fa2d6c79c0b8e958 /anime.go
parentaf9d2adedcb37b2c6c316cf52950a19d2a245803 (diff)
added option to use client authv0.0.5
Diffstat (limited to 'anime.go')
-rw-r--r--anime.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/anime.go b/anime.go
index d73920c..22935d3 100644
--- a/anime.go
+++ b/anime.go
@@ -116,8 +116,12 @@ func (c Client) GetSeasonalAnime(animes *[]Anime, params *SeasonalParams) error
return nil
}
-// TODO: only allow MainAuth not ClientAuth
func (c Client) GetSuggestedAnime(animes *[]Anime, params *SuggestedParams) error {
+ if c.ClientAuthOnly {
+ // this endpoint requires main auth
+ return ErrClientAuthNotSupported
+ }
+
err := validateSuggestedParams(params)
if err != nil {
return err