Commit 0f18a49e by Alex MacCaw

use clearbit.com

parent 5ac7b823
clearbit-node [![Build Status](https://travis-ci.org/bendrucker/clearbit-node.svg?branch=master)](https://travis-ci.org/bendrucker/clearbit-node) [![Code Climate](https://codeclimate.com/github/bendrucker/clearbit-node/badges/gpa.svg)](https://codeclimate.com/github/bendrucker/clearbit-node) [![Test Coverage](https://codeclimate.com/github/bendrucker/clearbit-node/badges/coverage.svg)](https://codeclimate.com/github/bendrucker/clearbit-node)
=============
Node library for querying the [Clearbit](https://clearbit.co) business intelligence APIs. Currently supports:
Node library for querying the [Clearbit](https://clearbit.com) business intelligence APIs. Currently supports:
* [Person API](https://clearbit.co/docs#person-api)
* [Company API](https://clearbit.co/docs#company-api)
* [Person API](https://clearbit.com/docs#person-api)
* [Company API](https://clearbit.com/docs#company-api)
## Setup
```bash
......@@ -25,7 +25,7 @@ var clearbit = new Client({key: 'api_key'});
* `email` *String*: The email address to look up **(required)**
* `webhook_id` *String*: Custom identifier for the webhook request
* `subscribe` *Boolean*: Set to `true` to subscribe to the changes
* `stream` *Boolean*: Set to `true` to use the [streaming API](https://clearbit.co/docs?shell#streaming) instead of webhooks
* `stream` *Boolean*: Set to `true` to use the [streaming API](https://clearbit.com/docs?shell#streaming) instead of webhooks
```js
var Person = clearbit.Person;
......@@ -49,7 +49,7 @@ Person.find({email: 'email@domain.com'})
#### `Company.find(options)` -> `Promise`
* `domain` *String*: The company domain to look up **(required)**
* `webhook_id` *String*: Custom identifier for the webhook request
* `stream` *Boolean*: Set to `true` to use the [streaming API](https://clearbit.co/docs?shell#streaming) instead of webhooks
* `stream` *Boolean*: Set to `true` to use the [streaming API](https://clearbit.com/docs?shell#streaming) instead of webhooks
```js
var Company = clearbit.Company;
......
......@@ -20,7 +20,7 @@ function ClearbitClient (config) {
this.PersonCompany = require('./person_company')(this);
}
var base = 'https://%s%s.clearbit.co/v%s';
var base = 'https://%s%s.clearbit.com/v%s';
ClearbitClient.prototype.base = function (options) {
options = _.defaults(options, {
version: '1',
......
......@@ -45,7 +45,7 @@ describe('Client', function () {
expect(client.base({
api: 'person'
}))
.to.equal('https://person.clearbit.co/v1');
.to.equal('https://person.clearbit.com/v1');
});
it('can generate a streaming base', function () {
......@@ -53,7 +53,7 @@ describe('Client', function () {
api: 'person',
stream: true
}))
.to.equal('https://person-stream.clearbit.co/v1');
.to.equal('https://person-stream.clearbit.com/v1');
});
it('can set a custom version', function () {
......@@ -61,7 +61,7 @@ describe('Client', function () {
api: 'person',
version: '2'
}))
.to.equal('https://person.clearbit.co/v2');
.to.equal('https://person.clearbit.com/v2');
});
});
......@@ -70,7 +70,7 @@ describe('Client', function () {
var mock;
before(function () {
mock = nock('https://person.clearbit.co');
mock = nock('https://person.clearbit.com');
});
after(nock.cleanAll);
afterEach(function () {
......
......@@ -8,7 +8,7 @@ describe('Company', function () {
var mock;
before(function () {
mock = nock('https://company.clearbit.co');
mock = nock('https://company.clearbit.com');
});
after(nock.cleanAll);
afterEach(function () {
......
......@@ -8,13 +8,13 @@
"email": "alex@alexmaccaw.com",
"gender": "male",
"location": "San Francisco",
"bio": "O'Reilly author, software engineer & traveller. Founder of https://clearbit.co",
"bio": "O'Reilly author, software engineer & traveller. Founder of https://clearbit.com",
"site": "http://alexmaccaw.com",
"avatar": "https://pbs.twimg.com/profile_images/1826201101/297606_10150904890650705_570400704_21211347_1883468370_n.jpeg",
"employment": {
"name": "Clearbit",
"title": "CEO",
"domain": "clearbit.co"
"domain": "clearbit.com"
},
"facebook": {
"handle": "amaccaw"
......@@ -30,7 +30,7 @@
"twitter": {
"handle": "maccaw",
"id": 2006261,
"bio": "O'Reilly author, software engineer & traveller. Founder of https://clearbit.co",
"bio": "O'Reilly author, software engineer & traveller. Founder of https://clearbit.com",
"followers": 14993,
"following": 1645,
"location": "San Francisco",
......
......@@ -8,7 +8,7 @@ describe('Person', function () {
var mock;
before(function () {
mock = nock('https://person.clearbit.co');
mock = nock('https://person.clearbit.com');
});
after(nock.cleanAll);
afterEach(function () {
......
......@@ -8,7 +8,7 @@ describe('PersonCompany', function () {
var mock;
before(function () {
mock = nock('https://person.clearbit.co');
mock = nock('https://person.clearbit.com');
});
after(nock.cleanAll);
afterEach(function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment