summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/sdk/product.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-09-25 14:53:02 -0400
committerJules Laplace <jules@okfoc.us>2015-09-25 14:53:02 -0400
commit3a4ccaade954bc8d9bc54bafa8a492ca75124979 (patch)
tree427820e837c290732005c2b1aeb724589b05ef89 /StoneIsland/www/js/sdk/product.js
parent365e6c93c1a57bb45d2ea274218378f642b4d425 (diff)
product api, mailing address api
Diffstat (limited to 'StoneIsland/www/js/sdk/product.js')
-rw-r--r--StoneIsland/www/js/sdk/product.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/StoneIsland/www/js/sdk/product.js b/StoneIsland/www/js/sdk/product.js
new file mode 100644
index 00000000..c904eb32
--- /dev/null
+++ b/StoneIsland/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