diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-09-05 21:09:11 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-09-05 21:09:11 +0530 |
commit | e5dfabfa8ee370cbcda356448d7153d53a59a5cf (patch) | |
tree | 98aaaebbdcc5fd5c796f2ff402a82997d622845d /user/README.md | |
parent | 4dd68495f4d1e993af72d2a47530e85522b43a6e (diff) |
Update README: add link to documentation website
Diffstat (limited to 'user/README.md')
-rw-r--r-- | user/README.md | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/user/README.md b/user/README.md index 2717835..ba76847 100644 --- a/user/README.md +++ b/user/README.md @@ -1,39 +1,6 @@ # MAL2Go/user MAL2Go `user` package has functionality related to getting data about the authenticated user. -## Usage -Firstly, import this package and instanciate the client. -``` go -import ( - "github.com/MikunoNaka/MAL2Go/v2/user" -) -``` - -Now instanciate with -``` go -myClient := user.Client { - AuthToken: "Bearer " + yourTokenHere, -} -``` - -- ### Get authenticated user's info -``` go -userData := myClient.GetSelfUserInfo() - -fmt.Println(userData.Name, userData.Picture) -``` - -The `User` datatype has the following fields: -- `Id` `int` -- `Name` `string` -- `Picture` `string` -- `Gender` `string` -- `Birthday` `string` -- `Location` `string` -- `JoinedAt` `string` -- `TimeZone` `string` -- `IsSupporter` `bool` - ## Structure - [user.go](user.go) Contains all the exported functions for pulling data from the API. |