genshin

package module
v0.0.0-...-e4c90c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2022 License: MIT Imports: 7 Imported by: 0

README

genshin-go

A package for fetching Genshin Impact users over Hoyoverse API.

Still in development!

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Ltuid   int
	Ltoken  string
	Chinese bool
}

func NewClient

func NewClient(Ltuid int, Ltoken string, Chinese bool) *Client

func (*Client) Get

func (c *Client) Get(endpoint string) []byte

func (*Client) GetUserStats

func (c *Client) GetUserStats(uid int) Users

type Offerings

type Offerings struct {
	Name  string `json:"name"`
	Level int64  `json:"level"`
}

type SimpleCharacters

type SimpleCharacters struct {
	ID         int64  `json:"id"`
	Image      string `json:"image"`
	Name       string `json:"name"`
	Element    string `json:"element"`
	Friendship int64  `json:"friendship"`
	Level      int64  `json:"level"`
	Rarity     int64  `json:"rarity"`
	Cons       int64  `json:"constellations"`
}

type Stats

type Stats struct {
	ActiveDay      int64  `json:"active_day"`
	Achievement    int64  `json:"achievement"`
	Characters     int64  `json:"characters"`
	WayPoint       int64  `json:"unlocked_waypoint"`
	Domain         int64  `json:"unlocked_domain"`
	SpiralAbyss    string `json:"spiral_abyss"`
	Anemoculus     int64  `json:"anemoculus"`
	Geoculus       int64  `json:"geoculus"`
	Electroculus   int64  `json:"electroculus"`
	PreciousChest  int64  `json:"precious_chest"`
	LuxuriousChest int64  `json:"luxurious_chest"`
	ExquisiteChest int64  `json:"exquisite_chest"`
	CommonChest    int64  `json:"common_chest"`
	MagicChest     int64  `json:"magic_chest"`
}

type Teapots

type Teapots struct {
	Name        string `json:"name"`
	Level       int64  `json:"level"`
	Icon        string `json:"icon"`
	Visitors    int64  `json:"visitors"`
	Comforts    int64  `json:"comforts"`
	Items       int64  `json:"item_num"`
	ComfortName string `json:"comfort_name"`
	ComfortIcon string `json:"comfort_icon"`
}

type Users

type Users struct {
	Characters []SimpleCharacters `json:"characters"`
	Stats      Stats              `json:"stats"`
	Worlds     []Worlds           `json:"explorations"`
	Teapots    []Teapots          `json:"teapots"`
}

func ParseUsers

func ParseUsers(data *raw.RawData) *Users

type Worlds

type Worlds struct {
	ID        int64     `json:"id"`
	Type      string    `json:"type"`
	Name      string    `json:"name"`
	Icon      string    `json:"icon"`
	Level     int64     `json:"level"`
	Explored  int64     `json:"explored"`
	Offerings Offerings `json:"offerings"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL