function asin_token_list in Amazon Product Advertisement API 6
Implementation of hook_token_list()
File
- asin/
asin.module, line 602 - Defines a field type for referencing an Amazon product.
Code
function asin_token_list($type = 'all') {
if ($type == 'field' || $type == 'all') {
$tokens = array();
$tokens['asin']['asin'] = t("Product ID");
$tokens['asin']['title'] = t("Product title");
$tokens['asin']['title-dec'] = t("Product title (HTML entities like '∓' are decoded. Best for use in node titles.)");
//isbn and ean removed, because they're not available in the database. can be readded later if those fields are made available
//$tokens['asin']['isbn'] = t("The 10-digit ISBN (INternational Standard Book Number)");
//$tokens['asin']['ean'] = t("The EAN or 13-digit ISBN");
$tokens['asin']['detailpageurl'] = t("The detail page URL for the item");
$tokens['asin']['salesrank'] = t("The product's sales rank");
$tokens['asin']['brand'] = t("The product's brand");
$tokens['asin']['brand-dec'] = t("The product's brand (HTML entities like '∓' are decoded.)");
$tokens['asin']['publisher'] = t("The product's publisher");
$tokens['asin']['publisher-dec'] = t("The product's publisher (HTML entities like '∓' are decoded.)");
$tokens['asin']['manufacturer'] = t("The product's manufacturer");
$tokens['asin']['manufacturer-dec'] = t("The product's manufacturer (HTML entities like '∓' are decoded.)");
$tokens['asin']['studio'] = t("The product's studio");
$tokens['asin']['studio-dec'] = t("The product's studio (HTML entities like '∓' are decoded.)");
$tokens['asin']['label'] = t("The product's label");
$tokens['asin']['label-dec'] = t("The product's label (HTML entities like '∓' are decoded.)");
$tokens['asin']['binding'] = t("The product's binding type");
$tokens['asin']['binding-dec'] = t("The product's binding type (HTML entities like '∓' are decoded.)");
$tokens['asin']['release'] = t("The product's release date");
$tokens['asin']['release-Y'] = t("The product's release date. 4 digit year only.");
$tokens['asin']['release-y'] = t("The product's release date. 2 digit year only.");
$tokens['asin']['release-m'] = t("The product's release date. 2 digit month only");
$tokens['asin']['release-n'] = t("The product's release date. 2 digit month only (no leading 0)");
$tokens['asin']['release-M'] = t("The product's release date. Abbreviated month only. (Example: 'Jan', 'Feb'");
$tokens['asin']['release-d'] = t("The product's release date. 2 digit day only");
$tokens['asin']['release-j'] = t("The product's release date. 2 digit day only (no leading 0)");
$tokens['asin']['list'] = t("The product's list price");
$tokens['asin']['list-amount'] = t("The product's list price (Unformatted)");
$tokens['asin']['list-currency'] = t("Currency code for the product's list price");
$tokens['asin']['lowest'] = t("The lowest price currently offered by any merchant at Amazon");
$tokens['asin']['lowest-amount'] = t("The lowest price currently offered by any merchant at Amazon (Unformatted)");
$tokens['asin']['lowest-currency'] = t("Currency code for the lowest price currently offered by any merchant at Amazon");
$tokens['asin']['amazon'] = t("Current price offered by Amazon");
$tokens['asin']['amazon-amount'] = t("Current price offered by Amazon (Unformatted)");
$tokens['asin']['amazon-currency'] = t("Currency code for the current price offered by Amazon");
$tokens['asin']['group'] = t("The product's product group or categorization of the product");
$tokens['asin']['group-dec'] = t("The product's product group (HTML entities like '∓' are decoded.)");
$tokens['asin']['type'] = t("The product's Amazon product type");
$tokens['asin']['type-dec'] = t("The product's Amazon product type (HTML entities like '∓' are decoded.)");
$tokens['asin']['author'] = t("The product's author(s)");
$tokens['asin']['author-dec'] = t("The product's author (HTML entities like '∓' are decoded.)");
$tokens['asin']['participants'] = t("The product's participants. All names listed on the product");
$tokens['asin']['participants-dec'] = t("The product's participants. (HTML entities like '∓' are decoded.)");
return $tokens;
}
}