heracles
npm i heracles

heracles

Hydra core hypermedia library

by hypermedia-app

0.1.3-a2 (see all)License:MITTypeScript:Not Found
npm i heracles
Readme

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

EnvironmentVersionNotes
node.js12+v12 requires --experimental-modules flag
TypeScript3.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

Downloads/wk

27

GitHub Stars

57

LAST COMMIT

3mos ago

MAINTAINERS

1

CONTRIBUTORS

9

OPEN ISSUES

14

OPEN PRs

0
VersionTagPublished
0.1.3-a2
latest
5yrs ago
No alternatives found
No tutorials found
Add a tutorial