svb-client
Advanced tools
Comparing version 2.4.6 to 2.5.1
@@ -21,11 +21,4 @@ // | ||
this.baseurl = options.BASE_URL || "https://api.svb.com"; | ||
this.company_id = options.COMPANY_ID; | ||
this.partner_id = options.PARTNER_ID; | ||
this.key_id = options.KEY_ID; | ||
this.apikey = options.API_KEY; | ||
this.hmac_secret = options.HMAC_SECRET; | ||
this.env = options.ENV || options.ENVIRONMENT || ''; | ||
if (this.env && ['live', 'test'].indexOf(this.env) === -1) { | ||
throw new Error('ENV must be "test" or "live".'); | ||
} | ||
} | ||
@@ -48,16 +41,2 @@ | ||
}; | ||
// optional headers | ||
if (this.company_id) { | ||
headers["X-Company-Id"] = this.company_id; | ||
} | ||
if (this.key_id) { | ||
headers["X-Key-Id"] = this.key_id; | ||
} | ||
if (this.partner_id) { | ||
headers["X-Partner-Id"] = this.partner_id; | ||
} | ||
if (this.env) { | ||
headers["X-Environment"] = this.env; | ||
} | ||
return headers; | ||
@@ -64,0 +43,0 @@ }, |
{ | ||
"name": "svb-client", | ||
"version": "2.4.6", | ||
"version": "2.5.1", | ||
"description": "NodeJS request client for SVB API", | ||
@@ -5,0 +5,0 @@ "main": "client.js", |
@@ -5,2 +5,5 @@ ## svb-client | ||
If you received a test API key and no HMAC SECRET, you should use a | ||
non-empty ASCII string as a placeholder (for example "HMAC SECRET"). | ||
## Installation | ||
@@ -21,7 +24,3 @@ | ||
// options below are optional, depending on use-case | ||
BASE_URL: '', | ||
COMPANY_ID: '', | ||
PARTNER_ID: '', | ||
KEY_ID: '', | ||
ENV: '' // 'test' or 'live' | ||
BASE_URL: '' | ||
}); | ||
@@ -28,0 +27,0 @@ |
5845
5
131
44