Skip to content

Latest commit

 

History

History
executable file
·
46 lines (36 loc) · 995 Bytes

README.md

File metadata and controls

executable file
·
46 lines (36 loc) · 995 Bytes

Vero Typescript Client

A wrapper for Vero's public api using Typescript.

A newly updated one did not exist, so I made one.

License

MIT

Installing

npm install vero-ts

Sample Usage

Create an instance

import Vero from 'vero-ts';

const vero = new Vero('<YOUR_AUTH_TOKEN>');

Call the methods

// -- Track a user
const userId:string = 'someId';
const userEmail:string = '[email protected]'
const dataAboutTheUser:object = {
    someProperty: 'someValue',
    anotherProperty: 123
}
await vero.Users.track(userId, userEmail, dataAboutTheUser);
// --

// -- Call an event
// (Assume the above user info still applies)
const eventName = '<EVENT-NAME>';
const eventData = {
    eventProperty: 'value',
    eventObjectProperty: {
        objectProperty: 'something'
    },
    anotherProperty: 123
};
await vero.Events.track(userId, userEmail, eventName, eventData);