api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DOMAIN = "https://earthmc.net/map/"
View Source
const MAP_DATA_ENDPOINT = "/standalone/MySQL_markers.php?marker=_markers_/marker_earth.json"

Variables

This section is empty.

Functions

func BuildURL

func BuildURL(mapName string) string

func FetchData

func FetchData(mapName string) (structs.MapResponse, error)

Types

type NationList

type NationList map[string]structs.Nation

func (NationList) Get

func (nations NationList) Get(name string) (*structs.Nation, error)

type Nations

type Nations struct {
	MapName string
}

func (*Nations) All

func (nations *Nations) All() (NationList, error)

func (*Nations) Get

func (nations *Nations) Get(name string) (*structs.Nation, error)

type Players

type Players struct {
}

type TownList

type TownList map[string]structs.Town

func (TownList) Get

func (towns TownList) Get(name string) (*structs.Town, error)

type Towns

type Towns struct {
	TownList
	MapName string
}

func (*Towns) All

func (towns *Towns) All() (TownList, error)

func (*Towns) Get

func (towns *Towns) Get(name string) (*structs.Town, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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