From cdea2828adc75b0a50cdc5b22e66bd13ad6878d2 Mon Sep 17 00:00:00 2001 From: Rick Marker Date: Thu, 15 Jun 2017 09:12:20 +0200 Subject: [PATCH 1/3] Added apikey to authenticated calls --- src/requestHelper.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/requestHelper.js b/src/requestHelper.js index ced528c..a7c7072 100644 --- a/src/requestHelper.js +++ b/src/requestHelper.js @@ -14,7 +14,8 @@ class RequestHelper { .then((responseToken) => { return { headers: { - authorization: `Bearer ${responseToken}` + authorization: `Bearer ${responseToken}`, + apiKey: accessProvider.apiKey } }; }); From e1a47eed35370b0fcd0a778222d93744a53d06ea Mon Sep 17 00:00:00 2001 From: Rick Marker Date: Thu, 15 Jun 2017 10:11:10 +0200 Subject: [PATCH 2/3] Changed casing to all lowercase --- src/requestHelper.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/requestHelper.js b/src/requestHelper.js index a7c7072..3bda22c 100644 --- a/src/requestHelper.js +++ b/src/requestHelper.js @@ -15,7 +15,7 @@ class RequestHelper { return { headers: { authorization: `Bearer ${responseToken}`, - apiKey: accessProvider.apiKey + apikey: accessProvider.apiKey } }; }); @@ -30,7 +30,7 @@ class RequestHelper { this.apiRequest = basicRequest.defaults({ headers: { - apiKey: accessProvider.apiKey + apikey: accessProvider.apiKey } }); } From c4baac0401b6e484a554727a8e3fdc4f3d421a13 Mon Sep 17 00:00:00 2001 From: Rick Marker Date: Thu, 15 Jun 2017 10:12:08 +0200 Subject: [PATCH 3/3] Bumped version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5c17988..741b5b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "trustpilot", - "version": "2.1.0", + "version": "2.2.0", "description": "HTTP client for Trustpilot", "homepage": "https://github.com/trustpilot/node-trustpilot", "repository": "https://github.com/trustpilot/node-trustpilot.git",