diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-08-15 10:57:27 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-08-15 10:57:27 +0530 |
commit | fff3dadabc321871e6819392efc605c6dffe2e69 (patch) | |
tree | 25aceed23b73b2ad975a06d73fad091d0886a2a6 /mal/mal.go | |
parent | a44d6eb2fdddc75983c735e1a0fa744014db9593 (diff) |
migrated from MAL2Go to mg package
Diffstat (limited to 'mal/mal.go')
-rw-r--r-- | mal/mal.go | 21 |
1 files changed, 4 insertions, 17 deletions
@@ -19,23 +19,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. package mal import ( - "github.com/MikunoNaka/macli/auth" - a "github.com/MikunoNaka/MAL2Go/v4/anime" - m "github.com/MikunoNaka/MAL2Go/v4/manga" - u "github.com/MikunoNaka/MAL2Go/v4/user" - ua "github.com/MikunoNaka/MAL2Go/v4/user/anime" - um "github.com/MikunoNaka/MAL2Go/v4/user/manga" + "vidhukant.com/macli/auth" + "vidhukant.com/mg" "github.com/spf13/viper" "strings" ) var ( Secret string - animeClient a.Client - mangaClient m.Client - userClient u.Client - userAnimeClient ua.Client - userMangaClient um.Client + MALClient mg.Client SearchLength, SearchOffset int SearchNSFW bool @@ -52,10 +44,5 @@ func Init() { } tk := "Bearer " + strings.TrimSpace(Secret) - // initialise MAL2Go Client(s) - animeClient.AuthToken = tk - mangaClient.AuthToken = tk - userClient.AuthToken = tk - userAnimeClient.AuthToken = tk - userMangaClient.AuthToken = tk + MALClient.MainAuth = tk } |