# shop.j: asks a REST price service for the price of a sku, in cents.# Tested by shop_test.j against a fake server.use json;
import"rest.j"as rest;
exportfuncprice(api asrest.Client, sku asstring) {
def v asjson.Value initrest.getJson($api, "/prices/" + $sku, {});
returnjson.asInt($v, "/cents");
}