krypton86
TypeScript icon, indicating that this package has built-in type declarations

0.0.0-canary.1 • Public • Published

krypton86

A client for krytpon86.com

Installation

You can install the krypton86 client in your local environment by running:

yarn add krytpon86

Configuration

To use the client you must provide an API key located from the krypton86 dashboard either as an environment variable KRYPTON86_API_KEY:

KRYPTON86_API_KEY="sk_live_1234" ./app

Or you can set it on your own before your application starts:

import Krypton86 from "krypton86";
 
const client = new Krypton86("sk_live_1234");

Usage

Incrementing a unit

const props = {
  loggedIn: false,
  room: "website",
  project: "ibm"
};
 
await client.incrUnit("customerRef", "User", props);

You can provide an optional amount parameter:

const props = {
  loggedIn: false,
  room: "website",
  project: "ibm"
};
 
await client.incrUnit("customerRef", "User", props, 1000);

If a customer associated with the customer ref does not exist, one will be created. You can manage customer's in the dashboard.

Readme

Keywords

Package Sidebar

Install

npm i krypton86

Weekly Downloads

0

Version

0.0.0-canary.1

License

MIT

Unpacked Size

12.3 kB

Total Files

29

Last publish

Collaborators

  • maxchehab