summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/www/js/sdk/product.js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/sdk/product.js')
-rw-r--r--StoneIsland/platforms/ios/www/js/sdk/product.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/StoneIsland/platforms/ios/www/js/sdk/product.js b/StoneIsland/platforms/ios/www/js/sdk/product.js
new file mode 100644
index 00000000..c904eb32
--- /dev/null
+++ b/StoneIsland/platforms/ios/www/js/sdk/product.js
@@ -0,0 +1,25 @@
+sdk.product = (function(){
+ var product = {}
+
+ product.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,
+ error: opt.error,
+ })
+ }
+
+ // https://gist.github.com/fanfare/2d25d1b36944188948ff
+ product.item = function(opt){
+ $.ajax({
+ method: "GET",
+ url: sdk.path("Item.API/1.0", "item/" + data.code + ".json"),
+ success: opt.success,
+ error: opt.error,
+ })
+ }
+
+ return product
+})() \ No newline at end of file