blob: 2054d0dc9c22be51c3fef8e6d12a3112050e28e8 (
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
|
var sdk = (function(){
var sdk = {}
var endpoint = "https://secure.api.yoox.biz/"
// var endpoint = "http://api.yoox.biz/"
sdk.init = function(opt){
switch (opt.env || "development") {
case 'test':
endpoint = "http://lvh.me:9090/"
break
default:
case 'development':
endpoint = "http://api.yoox.biz/"
break
case 'production':
endpoint = "https://secure.api.yoox.biz/"
break
}
}
sdk.path = function(api, path){
return endpoint + api + "/STONEISLAND_US/" + path
}
sdk.image = function(code, size){
return "http://cdn.yoox.biz/" + code.substr(0,2) + "/" + code.substr(0,8) + "_" + size + ".jpg"
}
$.ajaxSetup({
// possibly: application/json; charset=utf-8"
contentType: "application/json",
})
return sdk
})()
|