node package manager

hubspot

A node wrapper for the HubSpot API

node-hubspot

Node.js wrapper for the HubSpot API

npm install hubspot

var Client = require('hubspot');

var client = new Client();

/*
 * You can use either a key OR a token
 */
if (config.key) {
  client.useKey(config.key);
} else if (config.token) {
  client.useToken(config.token);
}

client.campaigns.get(function(err, res) {
  if (err) { throw err; }
  console.log(res);
});
client.companies.getRecentlyCreated(opts, cb)
client.contacts.get(opts, cb)
client.contacts.getByEmail(email, cb)
client.contacts.getByEmailBatch(emails, cb)
client.contacts.getById(id, cb)
client.contacts.update(id, data, cb)
client.contacts.create(data, cb)
client.contacts.createOrUpdateBatch(data, cb)
client.deals.getRecentlyCreated(opts, cb)
client.pipelines.get(opts, cb)
client.lists.get(opts, cb)
client.lists.getOne(id, cb)
client.lists.getContacts(id, opts, cb)
client.lists.getRecentContacts(id, opts, cb)
client.lists.addContacts(id, contactBody, cb)
client.files.get(cb)
client.files.getOne(id, cb)
client.subscriptions.get(opts, cb)
client.campaigns.get(opts, cb)
client.campaigns.getOne(id, appId, cb)
client.campaigns.events(opts, cb)
client.broadcasts.get(opts, cb)

MIT

Brian Falk @brainflake

Tim Atkinson @timisbusy

Tejas Manohar @tejasmanohar

Krispin Schulz @kr1sp1n