diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-08-15 15:42:00 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-08-15 15:42:00 +0530 |
commit | 33283bff8b1ae239036aeb1526ec3b7483767ed7 (patch) | |
tree | 3219f6a539acca526d2ea6c2fa2d6c79c0b8e958 /user.go | |
parent | af9d2adedcb37b2c6c316cf52950a19d2a245803 (diff) |
added option to use client authv0.0.5
Diffstat (limited to 'user.go')
-rw-r--r-- | user.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -20,6 +20,11 @@ package mg import "encoding/json" func (c Client) GetSelfInfo(user *User, getStatistics bool) error { + if c.ClientAuthOnly { + // this endpoint requires main auth + return ErrClientAuthNotSupported + } + endpoint := BASE_URL + "/users/@me" if getStatistics { endpoint += "?fields=anime_statistics" |