The Whirli Javascript Client provides convenient access to the Whirli API from applications written in javascript.
See the Whirli API docs.
Install the package with:
yarn add whirli-client
The client requires a Http Client (such as axios) to be passed in to the constructor. It will then use this client for all requests.
Simply import the Client and passed it the Http Client, and you're good to go:
import axios from 'axios';
import Client from 'whirli-client';
...
const api = new Client(axios);
const all = api.search.all();
Types are included with this package.
import axios from 'axios';
import Client from 'whirli-client';
...
const api: Client = new Client(axios);
Simply import the Client into a plugin file, and then inject it as you need it:
import Client from 'whirli-client';
export default function ( { app: { $axios } ) {
inject('whirli', Client($axios));
}
yarn lint
yarn type-check
yarn type-check:watch
yarn build
- Checkout develop
- Check package.json to see what the next release name will be (e.g. 0.0.10 means next is 0.0.11)
- Alter the CHANGELOG with the new release name and date, inserting it just below 'Unreleased'.
- Commit on to the develop branch
- Run
yarn release
- PR to master