1.0.0-beta7 • Published 10 months ago
morning-js v1.0.0-beta7
Installation
npm install --save morning-js
Usage
Import Library
import { Morning } from 'morning.js';
Initialize Client
const morning = new Morning(`<API KEY>`);
Update Metrics
// Incrementing the base metric
await morning.metrics.increment(`METRIC ID`, 1)
// Incrementing a metric with user data
await morning.metrics.increment(`METRIC ID`, 1, {
email: 'user@email.com',
personProperties: {
name: 'John Smith',
avatar: 'https://profile.com/image.png',
}
})
Reading Metrics
const metric = await morning.metrics.get(`METRIC ID`);
Reading Customer Profiles
Reading by id:
const customer = await morning.people.get(`PERSON ID`);
Searching by email or person id:
const customer = await morning.people.search({ email: 'email@domain.com' });
const customer = await morning.people.search({ personId: '123456' });
1.0.0-beta6
12 months ago
1.0.0-beta7
10 months ago
1.0.0-beta2
1 year ago
1.0.0-beta3
1 year ago
1.0.0-beta1
1 year ago
1.0.0-beta4
1 year ago
1.0.0-beta5
1 year ago
1.0.0-alpha4
1 year ago
1.0.0-alpha3
1 year ago
1.0.0-alpha2
1 year ago
1.0.0-alpha1
1 year ago