api

package
v1.54.2 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: AGPL-3.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ApiRoute = "/api"

Variables

This section is empty.

Functions

func NewEndpointHashes

func NewEndpointHashes(webapp *web.Web, api *Api) *registry.Endpoint

ShowAccount godoc @Summary Hashes @Tags hashes @Accept json @Produce json @Success 200 {object} api.Hashes @Router /api/hashes [get]

func NewEndpointPoBGoods

func NewEndpointPoBGoods(webapp *web.Web, api *Api) *registry.Endpoint

ShowAccount godoc @Summary PoB Goods @Tags pobs @Accept json @Produce json @Success 200 {array} configs_export.PoBGood @Router /api/pob_goods [get]

func NewEndpointPoBs

func NewEndpointPoBs(webapp *web.Web, api *Api) *registry.Endpoint

ShowAccount godoc @Summary Getting list of Player Owned Bases @Description in difference to Disco API, it is enriched with Nicknames/Infocard Names,Region names @Description Sector coordinates, and extra information written in Infocard (totally reflecting Darkstat itself) @Tags pobs @Accept json @Produce json @Success 200 {array} configs_export.PoB @Router /api/pobs [get]

func PostGraphPaths added in v1.54.0

func PostGraphPaths(webapp *web.Web, api *Api) *registry.Endpoint

ShowAccount godoc @Summary List of time measurements between two NPC bases/PoBs/Ore fields and etc. @Description You query by nicknames of objects from which base/pob/ore fields to which one @Description You receive result how many seconds it takes to reach destination for Transport, Frigate and Freighter @Description If destination is not reachable, you get time equal to Maximum of int32 = 9223372036854775807 @Tags graph @Accept json @Produce json @Param request body api.GraphPathBody true "Request body" @Success 200 {array} api.GraphPathsResp @Router /api/graph/paths [post]

func RegisterApiRoutes

func RegisterApiRoutes(w *web.Web, app_data *router.AppData) *web.Web

Types

type Api

type Api struct {
	// contains filtered or unexported fields
}

type GraphPathBody added in v1.54.0

type GraphPathBody struct {
	Routes []GraphPathReq `json:"routes"`
}

type GraphPathReq added in v1.54.0

type GraphPathReq struct {
	From string `json:"from" example:"li01_01_base"`
	To   string `json:"to" example:"br01_01_base"`
}

type GraphPathTime added in v1.54.0

type GraphPathTime struct {
	Transport *int `json:"transport"`
	Frigate   *int `json:"frigate"`
	Freighter *int `json:"freighter"`
}

type GraphPathsResp added in v1.54.0

type GraphPathsResp struct {
	Route GraphPathReq   `json:"route"`
	Time  *GraphPathTime `json:"time,omitempty"`
	Error string         `json:"error,omitempty"`
}

type Hashes

type Hashes struct {
	Data map[string]flhash.HashCode
}

Jump to

Keyboard shortcuts

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