Module FILLZ.SOURCE.AMAZONDE.v1

Provides access to AmazonDE pricing data.

Module Summary

Using offers

var amazon = FILLZ.SOURCE.AMAZONDE.v1;
var filter = FILLZ.FILTERS.v1;
//all new offers on amazon
var offers = amazon.offers(filter.condition.is_new());
//get lowest price
var price = offers.lowest_price.price;

Using last_updated

var amazon = FILLZ.SOURCE.AMAZONDE.v1;
debug('pricing data last updated ' + amazon.last_updated);

Using offer_count

var amazon = FILLZ.SOURCE.AMAZONDE.v1;
//get the number of new offers
debug('# new offers is ' + amazon.offer_count.new);
debug('# used offers is ' + amazon.offer_count.used);
debug('# collectible offers is ' + amazon.offer_count.collectible);

Using status

var amazon = FILLZ.SOURCE.AMAZONDE.v1;
if (amazon.status == 'missing') {
  debug('No pricing information is available for this item');
}
if (amazon.status == 'ok') {
  debug('Pricing information is available for this item');
}

Using trade_in

var amazon = FILLZ.SOURCE.AMAZONDE.v1;
debug('trade in value is ' + amazon.trade_in);

Using sales_rank

var amazon = FILLZ.SOURCE.AMAZONDE.v1;
debug('sales rank value is ' + amazon.sales_rank);

Using buy_box

var amazon = FILLZ.SOURCE.AMAZONDE.v1;
if (amazon.buy_box.new) {
  debug('price is ' + amazon.buy_box.new.price);
  debug('shipping is ' + amazon.buy_box.new.shipping);
  debug('total is ' + amazon.buy_box.new.total);
  debug('condition is ' + amazon.buy_box.new.condition);
}
if (amazon.buy_box.used) {
  debug('price is ' + amazon.buy_box.used.price);
  debug('shipping is ' + amazon.buy_box.used.shipping);
  debug('total is ' + amazon.buy_box.used.total);
  debug('condition is ' + amazon.buy_box.used.condition);
}

Properties

  • is_excluding_me

    If true, the offers from this source do not include your items.

  • last_updated

    Gets the last time the pricing data for this item was updated. Returned as a JavaScript Date object, or undefined if no value exists.

  • offer_count

    Gets a structure containing offer counts for various condition classes. Contains these sub-properties: - new - used - collectible

  • status

    Status of the pricing data. Possible values: - ok -- data is available and ready for use. - missing -- data has not been retrieved yet, or failed.

  • trade_in

    Get trade-in value of item

  • sales_rank

    Get sales rank of item

  • buy_box

    Get buy box structure for item. Contains these subproperties: - new - used Each of which contain these subproperties: - price - shipping - total - condition

Methods