-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,34 @@ | ||
# genshin.go | ||
# Genshingo | ||
|
||
still under development | ||
A wrapper to fetch your genshin user data! | ||
|
||
## Prerequisites | ||
- [Go](https://go.dev/) | ||
- HoyoLab Cookies - You can get you hoyolab cookies by visiting [hoyolab](https://www.hoyolab.com/) and logging in. After you login `Ctrl + Shift + I` then click on the `Console` Tab and then type `document.cookie` and thats the cookie! | ||
|
||
## Quick Start | ||
Import the `genshingo package first. | ||
```go | ||
package main | ||
|
||
import ( | ||
genshin "github.com/Nota30/genshingo" | ||
) | ||
|
||
func main() { | ||
init := genshin.Init{ | ||
Cookie: "cookie goes here", | ||
Server: "os", | ||
} | ||
|
||
user, err := init.GetUserData("uid") | ||
if err != nil { | ||
println(err) | ||
} | ||
|
||
println(user.Data.Info.Nickname) | ||
} | ||
``` | ||
|
||
## Issues | ||
- Currently only works with the `os` servers so the `cn` servers won't work. Will be added in a later release maybe? |