blob: ef29ff9210e9899dcea90c92293dd31ea1916e5a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
var sdk = (function(){
var sdk = {}
sdk.env = "development"
var endpoint = "https://secure.api.yoox.biz/"
// var endpoint = "http://api.yoox.biz/"
sdk.init = function(opt){
switch (sdk.env = opt.env || "development") {
case 'test':
endpoint = window.location.origin + "/"
break
default:
case 'development':
endpoint = "/"
break
case 'production':
endpoint = "https://secure.api.yoox.biz/"
break
}
}
sdk.path = function(api, path, cc){
return endpoint + api + "/STONEISLAND_" + (cc || sdk.cc()) + "/" + path
}
sdk.image = function(code, size){
return "https://cdn.yoox.biz/" + code.substr(0,2) + "/" + code + "_" + size + ".jpg"
}
sdk.cc = function(){
return sim.data.countryCode.toUpperCase()
// return 'CA'
}
sdk.cms = function(){
return "https://stone.giraffe.life"
// return "http://staging.stone.giraffe.life"
}
$.ajaxSetup({
// possibly: application/json; charset=utf-8"
contentType: "application/json",
})
return sdk
})()
|