Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nota30 authored Apr 24, 2023
1 parent 35372a6 commit 43718d8
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions README.md
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?

0 comments on commit 43718d8

Please sign in to comment.