summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/sdk/_sdk.js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www/js/sdk/_sdk.js')
-rw-r--r--StoneIsland/www/js/sdk/_sdk.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/StoneIsland/www/js/sdk/_sdk.js b/StoneIsland/www/js/sdk/_sdk.js
index a7ecf6d3..dedcd5f0 100644
--- a/StoneIsland/www/js/sdk/_sdk.js
+++ b/StoneIsland/www/js/sdk/_sdk.js
@@ -4,8 +4,17 @@ var sdk = (function(){
var endpoint = "https://sandbox.api.yoox.biz/"
sdk.init = function(opt){
- if (opt && opt.production) {
- endpoint = "https://secure.api.yoox.biz/"
+ switch (opt.env || "development") {
+ case "production":
+ endpoint = "https://secure.api.yoox.biz/"
+ break
+ case "test":
+ endpoint = "http://lvh.me:4567/"
+ break
+ case "development":
+ default:
+ endpoint = "https://sandbox.api.yoox.biz/"
+ break
}
}
@@ -23,4 +32,4 @@ var sdk = (function(){
})
return sdk
-})() \ No newline at end of file
+})()