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.