Module FILLZ.SOURCE.ABEBOOKS.v2

Provides access to AbeBooks pricing data.

Module Summary

Using offers

var abe = FILLZ.SOURCE.ABEBOOKS.v2;
var filter = FILLZ.FILTERS.v1;
//all new offers on abebooks
var offers = abe.offers(filter.condition.is_new());
//get lowest price
var price = offers.lowest_price_offer();

Using default_condition

var abe = FILLZ.SOURCE.ABEBOOKS.v2;
var filter = FILLZ.FILTERS.v1;
//if not provided, assume condition is acceptable
abe.default_condition(4);

var offers = abe.offers(filter.condition.is_new());
//"WARN: offer.condition is undefined" messages will no longer appear

Using status

var abe = FILLZ.SOURCE.ABEBOOKS.v2;

if (abe.status == 'missing') {
  debug('No pricing information is available for this item');
}

if (abe.status == 'ok') {
  debug('Pricing information is available for this item');
}

Properties

  • is_excluding_me

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

  • 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.

Methods

  • offers([filters...])

    Returns a list of Abebooks Offers (wrapped in an OfferList), where the offers satisfy all the filters provided.

    Parameters

    Returns

  • default_condition(value)

    In the event that a condition is not provided by abebooks for an offer, this method defines the condition value to return by default. Please note that this applies globally to all abebooks offers until you explicitly disable it.

    Parameters

    • value -- Any of the integers condition values 1-11 (as defined by ConditionFilter), or undefined to disable.