@qtoden/meos-client
v0.1.0
Published
A client and parser for the MeOS orienteering software's REST API
Maintainers
Readme
@qtoden/meos-client
A client and parser for MeOS's REST API, starting
with the MOPComplete competition feed (?difference=zero).
Install
npm install @qtoden/meos-clientUsage
import { createMeosClient } from "@qtoden/meos-client";
const client = createMeosClient({ baseUrl: "http://127.0.0.1:2009/meos" });
const competition = await client.getCompetition();
console.log(competition.classes, competition.teams, competition.competitors);If you already have the XML (e.g. from a file or a proxy), parse it directly:
import { parseCompetition } from "@qtoden/meos-client";
const competition = parseCompetition(xml);Status
Only the full MOPComplete competition feed is supported so far. More of
MeOS's REST API (results, status, IOF XML, ...) may be added over time.
Development
npm test # run tests
npm run build # compile to dist/Fixtures under fixtures/ are anonymized MeOS exports used in tests
(scripts/anonymize-fixture.ts, scripts/collect-fixture.ts,
scripts/inspect.ts are the tools used to prepare them).
