Helika User Acquisition SDK
SDK for use with the Events endpoints (https://api.helika.io/v1 or https://api-stage.helika.io/v1)
The Helika SDK is for developers to be able to make API calls to the Helika DEV and PROD endpoints.
The following pages will describe how to make calls to the Helika API. Developers will need to install the helika-sdk to their project.
Installation
npm i helika-sdk
Usage
API KEY
An API Key is required to use the SDK.
For an Events SDK Instance, an API Key from Helika is required. Please reach out to your Helika contact or inquiring through https://www.helika.io/contact/ .
Base URL
The SDK can send to DEV or PROD endpoints depending on the Base URLs to the sdk on instance creation (see step 1 in Instance Creation section).
EventsBaseURL
Use the EventsBaseURL enum for Helika.Events
For Development, use EVENT_DEV. This sends the events and queries to the develop environments.
For Production, use EVENT_PROD. This sends the events and queries to the production environments.
Quick Start
Event Example:
import Helika from "helika-sdk"
import { DisableDataSettings, EventsBaseURL } from "helika-sdk"
const gameId = 'my_game_name'
const helikaSDK = new Helika.EVENTS(api_key, gameId, EventsBaseURL.EVENTS_DEV);
helikaSDK.setDataSettings(DisableDataSettings.None);
await helikaSDK.startSession();
events = [{
event_type: 'win_event',
event: {
user: 'user_1',
win_number: 1,
wallet: '0x4kd....'
}
}]
helikaSDK.createEvent(events)
.then((resp) => {
}).catch(e => {
console.error(e);
});
Full docs
For the full documentation, please head to official docs.