Hydra core hypermedia library
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
.vscode
docs
gitbook
src
tests
.babelrc
.editorconfig
.gitignore
.nojekyll
.npmignore
.travis.yml
LICENSE
README.md
book.json
karma.conf.js
package.json
tsconfig.json
tslint.json
webpack.config.js
yarn.lock

README.md

Alcaeus Build Status BrowserStack Status

Hydra Core library for JavaScript

Alcaeus (pronounced AL-SEE-UHS) is a Promise-based library for consuming Hydra APIs.

Alcaeus is the birth name of Heracles. The demigod who defeated Hydra.

Installation

Use npm or yarn:

yarn add alcaeus

Usage

import {Hydra} from 'alcaeus';

const representation = await Hydra.loadResource('http://example.com/resource');
const rootResource = representation.root;

// contains supported classes, operations, etc.
const apiDocs = rootResource.apiDocumentation;
    
// same as rootResource['@id']
const id = rootResource.id; 

To learn more head to http://alcaeus.hydra.how.

More examples (outdated)

License

MIT