Alcaeus (pronounced AL-SEE-UHS
) is a Node.js/browser library for consuming Hydra APIs.
Alcaeus is the birth name of Heracles. The demigod who defeated Hydra.
Use npm or yarn:
npm i -S alcaeus
Environment | Version | Notes |
---|---|---|
node.js | 12+ | v12 requires --experimental-modules flag |
TypeScript | 3.8+ |
import { Hydra } from 'alcaeus/web' // (or 'alcaeus/node')
const { response, representation } = await Hydra.loadResource('http://example.com/resource');
const rootResource = representation.root;
// contains supported classes, operations, etc.
const apiDocs = Hydra.apiDocumentations[0];
const id = rootResource.id;
To learn more head to http://alcaeus.hydra.how.
MIT
Version | Tag | Published |
---|---|---|
0.1.3-a2 | latest | 5yrs ago |