eveapi

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

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

Go to latest
Published: Jul 25, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

README

eveapi

EVE Online API Client

make regenerates the API client from ESI's OpenAPI 3.1 specification:

https://esi.evetech.net/meta/openapi.json

ESI versions the API by compatibility date rather than by route version. The generated client is pinned to the date it was built against, exposed as esi.CompatibilityDate and sent as the X-Compatibility-Date header on every request. Regenerate to move to a newer date; available dates are listed at

https://esi.evetech.net/meta/compatibility-dates

Static data types in sde/ are generated from

https://developers.eveonline.com/static-data/eve-online-static-data-latest-yaml.zip

this repository only contains generated client interfaces, notification helper methods and generators

example authentication lib is located at

https://github.com/ferocious-space/evesso

Keeping up with upstream

Both sources move: CCP publishes new compatibility dates, and the static data export is rebuilt with most Tranquility deployments.

make check

reports whether either has moved, and exits 1 if so. It fetches two small JSON documents and no archive, so it is cheap to run often. On drift it lists the /meta/changelog entries published since the pinned date, which is what tells you whether a route you use was changed or removed.

To take an update:

make Downloads && make Generate
go build ./... && go vet ./...
go test ./...

make Downloads pins to the newest compatibility date by default; pass ESI_COMPAT_DATE=<date> to pin to a specific one. Regeneration rewrites esi/esi.gen.go, esi/compat.gen.go, notifications/parser.go and sde/*.go; hand-written esi/client.go is preserved.

Review the resulting diff rather than assuming it is mechanical. Moving to a newer compatibility date can rename or remove routes — /sovereignty/map became /sovereignty/systems, and /route/{origin}/{destination} gained renamed parameters — so a regeneration is a source-breaking change for callers, not a refresh.

Two tests guard the parts that fail quietly. They need network and, for the SDE, several GB of memory, so both are skipped by -short:

  • TestPinnedCompatibilityDateStillOffered fails once ESI stops offering the pinned date. Requests do not error when that happens; they silently resolve against a different date.
  • TestSDEArchiveParses parses every file in the export. New key shapes have broken the parser before, and one bad file used to take down the whole generation run.

sde.Build and sde.BuildDate record which static data export the committed types came from; make check compares them against the published manifest.

Generating the SDE needs roughly 9GB of memory — mapMoons.yaml alone peaks near 7.5GB — which is why scripts/sde.go keeps sdeParallel low.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadSDE added in v0.5.0

func DownloadSDE(client *http.Client, targetDir string, extract bool) error

func NewAPIClient added in v0.3.3

func NewAPIClient(cachedClient *http.Client) (*esi.ClientWithResponses, error)

NewAPIClient returns an ESI client pinned to the compatibility date this package was generated against. Pass nil to use http.DefaultClient.

Types

This section is empty.

Directories

Path Synopsis
Package esi provides primitives to interact with the openapi HTTP API.
Package esi provides primitives to interact with the openapi HTTP API.
internal
Code generated by github.com/ferocious-space/eveapi/scripts/generator.go ; DO NOT EDIT.
Code generated by github.com/ferocious-space/eveapi/scripts/generator.go ; DO NOT EDIT.

Jump to

Keyboard shortcuts

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