diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-09-16 15:06:56 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-09-16 15:06:56 -0400 |
| commit | 14699818d58beef4b9b20b3ddb3e03641c0b7f21 (patch) | |
| tree | 954ead80ac9b3fed5e75fa18eac4ab157a642a43 /StoneIsland/www/js/sdk/sdk.js | |
| parent | 0ff689f69ccf98d0a3e6f4e190fa3e44cf44c44c (diff) | |
populate collectionview
Diffstat (limited to 'StoneIsland/www/js/sdk/sdk.js')
| -rw-r--r-- | StoneIsland/www/js/sdk/sdk.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/StoneIsland/www/js/sdk/sdk.js b/StoneIsland/www/js/sdk/sdk.js new file mode 100644 index 00000000..1a1a03e0 --- /dev/null +++ b/StoneIsland/www/js/sdk/sdk.js @@ -0,0 +1,26 @@ +var sdk = (function(){ + var sdk = {} + + var endpoint = "https://secure.api.yoox.biz/" + + sdk.path = function(api, path){ + return endpoint + api + "/STONEISLAND_US/" + path + } + + sdk.fetch_collection = function(opt){ + $.ajax({ + method: "GET", + url: sdk.path("Search.API/1.2", "search.json"), + data: { format: "full", gallery: opt.gallery_id }, + success: opt.success, +// dataType: "jsonp", + cache: true, + }) + } + + sdk.image = function(code){ + return "http://cdn.yoox.biz/" + code.substr(0,2) + "/" + code + "_11_f.jpg" + } + + return sdk +})() |
