Miss any of our Open RFC calls?Watch the recordings here! »

alcaeus

1.0.1 • Public • Published

Alcaeus npm version Code coverage

Hydra Core library for JavaScript

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.

Installation

Use npm or yarn:

npm i -S alcaeus

Requirements

Environment Version Notes
node.js 12+ v12 requires --experimental-modules flag
TypeScript 3.8+

Usage

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.

More examples (outdated)

License

MIT

Install

npm i alcaeus

DownloadsWeekly Downloads

1,406

Version

1.0.1

License

MIT

Unpacked Size

391 kB

Total Files

143

Last publish

Collaborators

  • avatar