forked from wehriam/Close.io
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to specify a lead search query in a string instead of a l…
…ist of itemized search keywords
- Loading branch information
Showing
5 changed files
with
45 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,26 @@ closeio.lead.create({name: "Spider Man"}) | |
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: | ||
|
||
```javascript | ||
closeio.lead.search({query: 'name:"Bruce Wayne" email_address:[email protected]'}) | ||
.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: | ||
```javascript | ||
closeio.lead.search({name: "Bruce Wayne", email_address: '[email protected]'}) | ||
.then(function(search_results){ | ||
console.log(search_results.total_results); | ||
}); | ||
``` | ||
|
||
**Note**: The `query` parameter will override any other search keywords present in your dictionary. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "close.io", | ||
"preferGlobal": "false", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"author": "John Wehr <[email protected]>", | ||
"description": "", | ||
"contributors": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters