intercom-client
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -11,2 +11,4 @@ 'use strict'; | ||
var _bulk = require('./bulk'); | ||
var User = (function () { | ||
@@ -44,2 +46,7 @@ function User(client) { | ||
} | ||
}, { | ||
key: 'bulk', | ||
value: function bulk(params, f) { | ||
new _bulk.Bulk(this.client, 'user').bulk(params, f); | ||
} | ||
}]); | ||
@@ -46,0 +53,0 @@ |
{ | ||
"name": "intercom-client", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Official Node bindings to the Intercom API", | ||
@@ -21,3 +21,3 @@ "homepage": "https://github.com/intercom/intercom-node", | ||
"dependencies": { | ||
"unirest": "*" | ||
"unirest": "^0.4.2" | ||
}, | ||
@@ -24,0 +24,0 @@ "devDependencies": { |
@@ -10,5 +10,11 @@ # intercom-node | ||
## Installation | ||
```bash | ||
npm install intercom-client | ||
``` | ||
## Testing | ||
```node | ||
```bash | ||
npm test | ||
@@ -21,16 +27,18 @@ ``` | ||
``` | ||
```bash | ||
gulp babel | ||
``` | ||
Start a repl: | ||
Require Intercom: | ||
```node | ||
var Intercom = require('./dist/index'); | ||
``` | ||
node | ||
``` | ||
## Usage | ||
Require Intercom: | ||
```node | ||
var Intercom = require('./dist/index'); | ||
var Intercom = require('intercom-node'); | ||
``` | ||
@@ -41,3 +49,3 @@ | ||
```node | ||
var client = new Intercom.Client("app_id", "app_api_key"); | ||
var client = new Intercom.Client('app_id', 'app_api_key'); | ||
``` | ||
@@ -49,3 +57,3 @@ | ||
// Create/update a user | ||
client.users.create({ email: "jayne@serenity.io" }, function (r) { | ||
client.users.create({ email: 'jayne@serenity.io' }, function (r) { | ||
console.log(r); | ||
@@ -123,3 +131,3 @@ }); | ||
// Create/update a company | ||
client.companies.create({ company_id: "1234", name: "serenity" }, function (r) { | ||
client.companies.create({ company_id: '1234', name: 'serenity' }, function (r) { | ||
console.log(r); | ||
@@ -233,2 +241,14 @@ }); | ||
## Bulk users | ||
The [Bulk APIs](https://doc.intercom.io/api/#bulk-apis) are themselves in Beta, but allow for the | ||
asynchronous creation and deletion of users: | ||
```node | ||
client.users.bulk([ | ||
{ create: { email: 'wash@serenity.io' }}, | ||
{ create: { email: 'mal@serenity.io'}} | ||
], callback); | ||
``` | ||
## Pagination | ||
@@ -235,0 +255,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
24131
14
418
0
269
+ Addedasn1@0.1.11(transitive)
+ Addedassert-plus@0.1.5(transitive)
+ Addedaws-sign2@0.5.0(transitive)
+ Addedbl@0.9.5(transitive)
+ Addedboom@0.4.2(transitive)
+ Addedcaseless@0.8.0(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedcryptiles@0.2.2(transitive)
+ Addedctype@0.5.3(transitive)
+ Addedforever-agent@0.5.2(transitive)
+ Addedhawk@1.1.1(transitive)
+ Addedhoek@0.9.1(transitive)
+ Addedhttp-signature@0.10.1(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedisarray@0.0.1(transitive)
+ Addedmime@1.2.11(transitive)
+ Addedmime-types@1.0.2(transitive)
+ Addednode-uuid@1.4.8(transitive)
+ Addedoauth-sign@0.5.0(transitive)
+ Addedqs@2.3.3(transitive)
+ Addedreadable-stream@1.0.34(transitive)
+ Addedrequest@2.51.0(transitive)
+ Addedsntp@0.2.4(transitive)
+ Addedstring_decoder@0.10.31(transitive)
+ Addedstringstream@0.0.6(transitive)
+ Addedtldts@6.1.71(transitive)
+ Addedtldts-core@6.1.71(transitive)
+ Addedtough-cookie@5.1.0(transitive)
+ Addedtunnel-agent@0.4.3(transitive)
+ Addedunirest@0.4.2(transitive)
- Removedajv@6.12.6(transitive)
- Removedasn1@0.2.6(transitive)
- Removedassert-plus@1.0.0(transitive)
- Removedasynckit@0.4.0(transitive)
- Removedaws-sign2@0.7.0(transitive)
- Removedaws4@1.13.2(transitive)
- Removedbcrypt-pbkdf@1.0.2(transitive)
- Removedcaseless@0.12.0(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removedcore-util-is@1.0.2(transitive)
- Removeddashdash@1.14.1(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removedecc-jsbn@0.1.2(transitive)
- Removedextend@3.0.2(transitive)
- Removedextsprintf@1.3.0(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedforever-agent@0.6.1(transitive)
- Removedform-data@2.3.3(transitive)
- Removedgetpass@0.1.7(transitive)
- Removedhar-schema@2.0.0(transitive)
- Removedhar-validator@5.1.5(transitive)
- Removedhttp-signature@1.2.0(transitive)
- Removedis-typedarray@1.0.0(transitive)
- Removedisstream@0.1.2(transitive)
- Removedjsbn@0.1.1(transitive)
- Removedjson-schema@0.4.0(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedjsprim@1.4.2(transitive)
- Removedmime@2.6.0(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removedoauth-sign@0.9.0(transitive)
- Removedperformance-now@2.1.0(transitive)
- Removedpsl@1.15.0(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedqs@6.5.3(transitive)
- Removedrequest@2.88.2(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsshpk@1.18.0(transitive)
- Removedtough-cookie@2.5.0(transitive)
- Removedtunnel-agent@0.6.0(transitive)
- Removedtweetnacl@0.14.5(transitive)
- Removedunirest@0.6.0(transitive)
- Removeduri-js@4.4.1(transitive)
- Removeduuid@3.4.0(transitive)
- Removedverror@1.10.0(transitive)
Updatedunirest@^0.4.2