@storinka/client
v1.6.0
Published
Storinka JavaScript Client
Downloads
13
Readme
Storinka JavaScript Client
Documentation: api.storinka.menu/docs
Installation
NPM:
npm install @storinka/client
Yarn:
yarn add @storinka/client
Example
import StorinkaClient, { ApiError } from "@storinka/client";
const storinka = new StorinkaClient({
clientId: "your-client-id-here",
});
storinka.invoke("getFullCafe", {
id: "kava-gallery",
}).then(cafe => {
console.log(cafe);
}).catch(error => {
if (error instanceof ApiError) {
console.log("request failed", error);
} else {
console.log("network error");
}
});