HawAPI SDK for JavaScript/TypeScript
npm install @hawapi/js-sdk
yarn add @hawapi/js-sdk
<script src="https://cdn.jsdelivr.net/npm/@hawapi/js-sdk/dist/index.umd.min.js"></script>
const client = HawAPI.createClient();
// Also valid:
// const { createClient } = HawAPI
// const client = createClient()
console.log('HawAPI client: ', client);
import { createClient } from '<path>';
const client = createClient();
console.log('HawAPI client: ', client);
const result = client
.getAll('actors')
.then((data) => data)
.catch((err) => console.error(err));
let result;
try {
result = await client.getAll('actors');
} catch (err) {
console.error(err);
}
This repository uses typescript-library-boilerplate as template.