@thirstie/thirstieclient

0.0.7 • Public • Published

ThirstieClient

ThirstieClient provides a service layer for using the Thirstie ECommerce API which can be imported as a CommonJS or ES module.

Installation

  • npm install @thirstie/thirstieclient

Minimum Requirements

  • Node.js: v18+

Usage

You must have an Thirstie API Client Key (provided by your Thirstie representative) to initialize ThirstieClient. Optionally, you can also provide a Google API key to enable location services using Google's Maps / Places API.

async function main (apiKey, mapsKey) {
  const thirstieapp = new ThirstieClient({ apiKey, mapsKey });
  const res = await thirstieapp.initSession();
  console.log(res);
}

main();

Expected output:

{
  application_name: '<your thirstie application name>',
  session_uuid: '<session uuid>',
  token: '<access jwt>',
  token_type: 'Bearer',
  user: null,
  uuid: '<thirstie application uuid>'
}

Readme

Keywords

none

Package Sidebar

Install

npm i @thirstie/thirstieclient

Weekly Downloads

31

Version

0.0.7

License

MIT

Unpacked Size

745 kB

Total Files

45

Last publish

Collaborators

  • technology-thirstie
  • thirstie_bart