aboutsummaryrefslogtreecommitdiff
path: root/mal/mal.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2023-08-15 10:57:27 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2023-08-15 10:57:27 +0530
commitfff3dadabc321871e6819392efc605c6dffe2e69 (patch)
tree25aceed23b73b2ad975a06d73fad091d0886a2a6 /mal/mal.go
parenta44d6eb2fdddc75983c735e1a0fa744014db9593 (diff)
migrated from MAL2Go to mg package
Diffstat (limited to 'mal/mal.go')
-rw-r--r--mal/mal.go21
1 files changed, 4 insertions, 17 deletions
diff --git a/mal/mal.go b/mal/mal.go
index 69cb1f1..ce25d22 100644
--- a/mal/mal.go
+++ b/mal/mal.go
@@ -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
}