diff options
author | Vidhu Kant Sharma <vidhukant@protonmail.ch> | 2022-02-17 21:55:42 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@protonmail.ch> | 2022-02-17 21:55:42 +0530 |
commit | f1a83e9b5cf1931adcdccef9db4586eeab987700 (patch) | |
tree | dd2f0ea29cfa0d585427a403a5be32a8ff4d4272 /anime/anime.go | |
parent | 7a910534c8d1e82420ef763b514f2763bda63e65 (diff) |
actually fixed all the errors with broken imports and clients
Diffstat (limited to 'anime/anime.go')
-rw-r--r-- | anime/anime.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/anime/anime.go b/anime/anime.go index 3330c16..01dbbb5 100644 --- a/anime/anime.go +++ b/anime/anime.go @@ -31,7 +31,7 @@ const BASE_URL string = "https://api.myanimelist.net/v2/anime" const maxAnimeLimit int = 500 // in MAL documentation this is named Get Anime List -func (c AnimeClient) SearchAnime(searchString string, limit, offset int, fields []string) (AnimeSearch, error) { +func (c Client) SearchAnime(searchString string, limit, offset int, fields []string) (AnimeSearch, error) { var searchResults AnimeSearch // error handling for limit and offset @@ -75,7 +75,7 @@ func (c AnimeClient) SearchAnime(searchString string, limit, offset int, fields } // Each anime has its own ID on MAL -func (c AnimeClient) GetAnimeById(animeId int, fields []string) (Anime, error) { +func (c Client) GetAnimeById(animeId int, fields []string) (Anime, error) { var anime Anime // handle all the errors for the fields @@ -101,7 +101,7 @@ func (c AnimeClient) GetAnimeById(animeId int, fields []string) (Anime, error) { } // Ranking is a list of anime sorted by their rank -func (c AnimeClient) GetAnimeRanking(rankingType string, limit, offset int, fields []string) (AnimeRanking, error) { +func (c Client) GetAnimeRanking(rankingType string, limit, offset int, fields []string) (AnimeRanking, error) { var animeRanking AnimeRanking // error handling for limit and offset @@ -158,7 +158,7 @@ func (c AnimeClient) GetAnimeRanking(rankingType string, limit, offset int, fiel } // get list of animes from specified season -func (c AnimeClient) GetSeasonalAnime(year, season, sort string, limit, offset int, fields []string) (SeasonalAnime, error) { +func (c Client) GetSeasonalAnime(year, season, sort string, limit, offset int, fields []string) (SeasonalAnime, error) { var seasonalAnime SeasonalAnime // error handling for limit and offset @@ -212,7 +212,7 @@ func (c AnimeClient) GetSeasonalAnime(year, season, sort string, limit, offset i } // get anime suggestions for the user -func (c AnimeClient) GetSuggestedAnime(limit, offset int, fields []string) (SuggestedAnime, error){ +func (c Client) GetSuggestedAnime(limit, offset int, fields []string) (SuggestedAnime, error){ var suggestedAnime SuggestedAnime // error handling for limit and offset |