Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

dmaltsiniotis/threads.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

threads.io nodejs api

This project is an npm module that implements the Threads.io API

install instructions:

npm install threads.io

In your project: var threadsio = require('threads.io')('YOUR_THREADS.IO_API_KEY');

Usage:

###identify(params, callback)###


var params = {
	userid: '1234567890', //required
	traits: {
		email: '[email protected]',
		fullname: 'Mister Smith'
	}
};

threadsio.identify(params, function (error, result) {
	if (result === true) {
		// Everything is great...
	} else {
		// Everything is not great...
		console.log(error);
	}
});

###track(params, callback)###


var params = {
	userid: '1234567890', //required
	traits: {
		email: '[email protected]',
		fullname: 'Mister Smith'
	}
};

threadsio.identify(params, function (error, result) {
	if (result === true) {
		// Everything is great...
	} else {
		// Everything is not great...
		console.log(error);
	}
});

###page(params, callback)###


var params = {
	userid: '1234567890', //required
	traits: {
		email: '[email protected]',
		fullname: 'Mister Smith'
	}
};

threadsio.identify(params, function (error, result) {
	if (result === true) {
		// Everything is great...
	} else {
		// Everything is not great...
		console.log(error);
	}
});

###remove(params, callback)###


var params = {
	userid: '1234567890', //required
	traits: {
		email: '[email protected]',
		fullname: 'Mister Smith'
	}
};

threadsio.identify(params, function (error, result) {
	if (result === true) {
		// Everything is great...
	} else {
		// Everything is not great...
		console.log(error);
	}
});

About

NodeJS NPM module for threads.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published