1.0.0-beta7 • Published 2 years ago

morning-js v1.0.0-beta7

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
2 years ago

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

2 years ago

1.0.0-beta7

2 years ago

1.0.0-beta2

2 years ago

1.0.0-beta3

2 years ago

1.0.0-beta1

2 years ago

1.0.0-beta4

2 years ago

1.0.0-beta5

2 years ago

1.0.0-alpha4

3 years ago

1.0.0-alpha3

3 years ago

1.0.0-alpha2

3 years ago

1.0.0-alpha1

3 years ago