1.0.9 • Published 9 months ago

@evefan/sdk-js v1.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

Evefan SDK for JavaScript (BETA)

Evefan SDK to manage events and query information.

Installation

Install the SDK using npm:

npm install @evefan/sdk-js

API Reference

EvefanSDK(writeKey, workerUrl)

Creates a new instance of the Evefan SDK.

  • evefanHost: The Host URL of the Evefan worker
  • writeKey: Your Evefan write key

evefan.query(sqlQuery)

Executes a SQL query against your Evefan data.

  • sqlQuery: SQL query string

Returns a Promise that resolves with the query results.

Code Snippet for Node.js

Note: Our module is an ESM module, so you need to use import instead of require and in your package.json you need to set "type": "module"

Here's a standalone code snippet you can use as a starting point:

import Evefan from "@evefan/sdk-js";

const ef = new Evefan({ evefanHost, writeKey });

// Track Data
ef.track({
  userId: "019mr8mf4r",
  event: "Item Purchased",
  properties: {
    revenue: 39.95,
    shippingMethod: "2-day",
  },
});

// Query Data
const result = await ef.query("SELECT * FROM evefan limit 5;");

License

MIT

Support

For issues and feature requests, please open an issue on GitHub.

1.0.9

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago