Skip to content

Commit

Permalink
Merge pull request #4 from callinize/feature/query-params
Browse files Browse the repository at this point in the history
Feature/query params
  • Loading branch information
kessiler committed Mar 3, 2016
2 parents 5eac07e + 9099e2d commit e1c54b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ GoogleContacts.prototype.getContacts = function (cb, params) {
GoogleContacts.prototype.getContact = function (cb, params) {
var self = this;

if(!params.id){
if(!_.has(params, 'id')){
return cb("No id found in params");
}

Expand Down Expand Up @@ -178,6 +178,9 @@ GoogleContacts.prototype._buildPath = function (params) {
if (params['updated-min'])
query['updated-min'] = params['updated-min'];

if (params.q || params.query)
query.q = params.q || params.query;

var path = '/m8/feeds/';
path += params.type + '/';
path += params.email + '/';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "google-contacts",
"version": "0.1.3",
"version": "0.1.4",
"description": "API wrapper for Google Contacts",
"main": "index.js",
"directories": {
Expand Down

0 comments on commit e1c54b3

Please sign in to comment.