summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/sdk/product.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-01-20 02:11:37 +0100
committerJules Laplace <jules@okfoc.us>2016-01-20 02:11:37 +0100
commite1c123f323a9c4b3d4b488ee9c8d6046d368e73b (patch)
tree9cc6e685e2f91d338bccb8b7cd29f5c1469afb4b /StoneIsland/www/js/sdk/product.js
parent9c00e423f03a768668982061c65a6e95f77664d1 (diff)
bump search api version
Diffstat (limited to 'StoneIsland/www/js/sdk/product.js')
-rwxr-xr-xStoneIsland/www/js/sdk/product.js25
1 files changed, 23 insertions, 2 deletions
diff --git a/StoneIsland/www/js/sdk/product.js b/StoneIsland/www/js/sdk/product.js
index 7c12e7d7..671d1fea 100755
--- a/StoneIsland/www/js/sdk/product.js
+++ b/StoneIsland/www/js/sdk/product.js
@@ -2,20 +2,41 @@ sdk.product = (function(){
var product = {}
var default_gallery = 31617
+ var default_department = "NkXStnsl"
product.all = function(opt){
return $.ajax({
method: "GET",
- url: sdk.path("Search.API/1.2", "search.json"),
+ url: sdk.path("Search.API/1.3", "search.json"),
data: { format: "full", productsPerPage: 100 },
success: opt.success,
error: opt.error,
})
}
-
+
product.collection = function(opt){
return $.ajax({
method: "GET",
+ url: sdk.path("Search.API/1.3", "search.json"),
+ data: { format: "full", department: opt.department_id || default_department, productsPerPage: 100 },
+ success: opt.success,
+ error: opt.error,
+ })
+ }
+
+ product.department_codes = function(opt){
+ return $.ajax({
+ method: "GET",
+ url: sdk.path("Search.API/1.3", "search/results.json"),
+ data: { format: "full", department: opt.department_id || default_department, page: 1 },
+ success: opt.success,
+ error: opt.error,
+ })
+ }
+
+ product.collection_by_gallery = function(opt){
+ return $.ajax({
+ method: "GET",
url: sdk.path("Search.API/1.2", "search.json"),
data: { format: "full", gallery: opt.gallery_id || default_gallery, productsPerPage: 100 },
success: opt.success,