From 33283bff8b1ae239036aeb1526ec3b7483767ed7 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Tue, 15 Aug 2023 15:42:00 +0530 Subject: added option to use client auth --- anime.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'anime.go') 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 -- cgit v1.2.3