blob: 2cf58452869dbdfb6a74e31e9e87ddf19798597f (
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
|
sdk.product = (function(){
var product = {}
product.collection = function(opt){
return $.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){
return $.ajax({
method: "GET",
url: sdk.path("Item.API/1.0", "item/" + opt.code + ".json"),
success: opt.success,
error: opt.error,
})
}
return product
})()
|