Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

close.io

Package Overview
Dependencies
Maintainers
6
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

close.io

Close.io ========

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.2K
increased by12.1%
Maintainers
6
Weekly downloads
 
Created
Source

Close.io

A Close.io API wrapper for Node.js. See the API documentation at http://developer.close.io/

Installation

npm install --save close.io

Usage

npm install
mocha test

Get an API key from your settings page: https://app.close.io/settings/

var Closeio = require('close.io');

var closeio = new Closeio("YOUR_API_KEY_HERE");

closeio.lead.create({name: "Spider Man"})
.then(function(lead){
  return closeio.lead.read(lead.id);
}).then(function(lead){
  return closeio.lead.update(lead.id, {name: "Peter Parker"});
}).then(function(lead){
  return closeio.lead.delete(lead.id);
}).then(function(){
  return closeio.lead.search({name:"Bruce Wayne"});
}).then(function(search_results){}, function(err){
  console.log("There has been an error.");
  console.log(err);
});

Searching for Leads

The lead.search method accepts either a string or a dictionary of search keywords as valid parameters.

To use a string to specify your search query, pass a query parameter to the lead.search method:

closeio.lead.search({query: 'name:"Bruce Wayne" email_address:bruce@wayneenterprises.com'})
.then(function(search_results){
  console.log(search_results.total_results);
});

To use a dictionary of search keywords to specify your search query, structure your parameters as follows:

closeio.lead.search({name: "Bruce Wayne", email_address: 'bruce@wayneenterprises.com'})
.then(function(search_results){
  console.log(search_results.total_results);
});

Note: The query parameter will override any other search keywords present in your dictionary.

Keywords

FAQs

Package last updated on 11 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc