Getting started

Installation

To install Alcaeus is to simply add its package using yarn, npm or your shinier package manager:

$ yarn add alcaeus
$ npm install --save alcaeus

Basic usage

Typically one would import an instance set up with sensible defaults

import {Hydra} from 'alcaeus';

Throughout these pages runnable examples will be shown using runkit, which only supports commonjs. Hence, the require function is used instead of ES6 imports

Here's a most basic example, which fetches an API entrypoint

 
const client = require("alcaeus@0.4.0-a5").Hydra;

await client.loadResource('http://wikibus-test.gear.host/');

Also note that runkit examples will be shown loading a specific version, which one would not include in real code.

results matching ""

    No results matching ""