ire

package
v0.0.0-...-fab16b2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var APIURL string

APIURL is read and set from config.yaml by main.init()

Functions

This section is empty.

Types

type Event

type Event struct {
	ID          int    `json:"id"`
	Caption     string `json:"caption"`
	Description string `json:"description"`
	Type        string `json:"type"`
	Date        string `json:"date"`
}

Event represents a single event per IRE's gamefeed

type Gamefeed

type Gamefeed struct {
	LastID int
	Events *[]Event
}

Gamefeed is a collection of Events, ahead of LastID

func (*Gamefeed) Sync

func (g *Gamefeed) Sync() ([]Event, error)

Sync gets the latest events from API endpoint, returns deathsights

type Player

type Player struct {
	Name         string `json:"name"`
	Fullname     string `json:"fullname"`
	City         string `json:"city"`
	House        string `json:"house"`
	Level        string `json:"level"`
	Class        string `json:"class"`
	MobKills     string `json:"mob_kills"`
	PlayerKills  string `json:"player_kills"`
	XPRank       string `json:"xp_rank"`
	ExplorerRank string `json:"explorer_rank"`
}

Player represents a player per IRE's API

func GetPlayer

func GetPlayer(player string) (*Player, error)

GetPlayer performs a lookup and retrieve a player from IRE's API

func (*Player) String

func (s *Player) String() string

Jump to

Keyboard shortcuts

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