From 82392fd0844d2966d5c558e8ab7a4fe8cfa5190a Mon Sep 17 00:00:00 2001 From: Rohit Krishnan Date: Wed, 28 Jun 2017 15:25:33 -0400 Subject: [PATCH 1/4] update to v3 and fix ranking --- lib/peapod.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/peapod.js b/lib/peapod.js index 9c67e05..af8e043 100755 --- a/lib/peapod.js +++ b/lib/peapod.js @@ -162,18 +162,18 @@ Peapod.prototype.authenticate = function (callback) { Peapod.prototype.search = function (query, callback) { var params = { - 'facet': 'singleRootCat,brands,nutrition,specials,newArrivals', + 'facet': 'singleRootCat,brands,nutrition,specials,newArrivals,privateLabel', 'facetExcludeFilter': 'true', 'filter': '', 'flags': 'true', 'keywords': query, 'nutrition': 'true', 'rows': '120', - 'sort': 'bestMatch+asc', + 'sort': 'bestMatch asc', 'start': '0' }; - this.request('GET', 'v2.0/user/products', params, function (err, body, response) { + this.request('GET', 'v3.0/user/products', params, function (err, body, response) { if (err) { callback(err, null); } else { diff --git a/package.json b/package.json index a5dc9e9..39790e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "peapod", - "version": "0.0.1", + "version": "0.0.2", "description": "A library for accessing the unofficial Peapod API.", "main": "index.js", "repository": { From 7669a70618a38fef94253f2894c03f5433c34faf Mon Sep 17 00:00:00 2001 From: Rohit Krishnan Date: Wed, 28 Jun 2017 15:30:59 -0400 Subject: [PATCH 2/4] changed package name since owner wont accept pr --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 39790e3..7c5942c 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "peapod", + "name": "peapod-v3", "version": "0.0.2", "description": "A library for accessing the unofficial Peapod API.", "main": "index.js", From 8e0901ae70d2f2b5382946edadb9fe15dd5e8824 Mon Sep 17 00:00:00 2001 From: Rohit Krishnan Date: Wed, 28 Jun 2017 15:34:02 -0400 Subject: [PATCH 3/4] forgot package --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 7c5942c..cb79a23 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ }, "dependencies": { "async": "^1.5.0", + "node-uuid": "^1.4.8", "request": "~2.67.0" }, "devDependencies": { From 0826278cb31a6fefcb9d7e9f404c7800f24f5bdc Mon Sep 17 00:00:00 2001 From: Rohit Krishnan Date: Wed, 28 Jun 2017 15:34:33 -0400 Subject: [PATCH 4/4] oops --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cb79a23..a9dc5f3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "peapod-v3", - "version": "0.0.2", + "version": "0.0.3", "description": "A library for accessing the unofficial Peapod API.", "main": "index.js", "repository": {