Skip to content

Latest commit

 

History

History
76 lines (53 loc) · 2.16 KB

README.md

File metadata and controls

76 lines (53 loc) · 2.16 KB

Node Intercom

An interface for speaking to intercom.io API. There complete docs can be found here - http://docs.intercom.io/api

Installation

I always recommend you bundle your dependencies with your application. To do this, create a package.json file in the root of your project with the minimum information...

{
  "name": "yourapplication",
  "version": "0.1.0",
  "dependencies": {
    "node-intercom": "0.0.4"
  }
}

Then run the following command using npm...

npm install

OR, if you just want to start playing with the library run...

npm install node-intercom

API Overview

var settings = {
  "API_KEY": "your_API_key",
  "APP_ID": "your_APP_ID"
}

var intercom = require('node-intercom').app(settings);

intercom.users.get('[email protected]',function(code, body){
  
    // code is the Request Status Code from the API
    // body is the Response Body as a Buffer.
    console.log(code, body.toString());
});

See test/index.js for more examples.

Missing or TODO

  • Impressions API
  • Message Threads API

License

Copyright 2012 Chloi Inc. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.