amazOOP amazOOP
[ class tree: amazOOP ] [ index: amazOOP ] [ all elements ]

Class: HeavyDetails

Source Location: /heavyDetails.class.php

Class Overview

AmazonItem
   |
   --LiteDetails
      |
      --HeavyDetails
The HeavyDetails class is used to store information on products returned when doing a heavy request to AWS.

Author(s):

Version: 0.3RC1

Copyright: 2004 (c) Mauricio Diaz Orlich

Methods


Inherited Methods:

Class: LiteDetails

LiteDetails::buyNow()
A remote "Add to Cart" form for the current product.
LiteDetails::getArtists()
Displays the musicians of a CD or cassette.
LiteDetails::getAuthors()
Displays the authors of a book.
LiteDetails::getAvailability()
Shows the product current availability as indicated by Amazon.
LiteDetails::getCatalog()
Decodes the catalog. The catalog determines which "aile" of the Amazon store this product belongs to. This seems to be in English in all locales.
LiteDetails::getImage()
This function will return either the IMG or the URL for the specified image size.
LiteDetails::getManufacturer()
Manufacturer of product. Can represent publishers (for books), labels (for music) or studios (for films).
LiteDetails::getMerchantId()
The merchant ID of a Third Party Seller.
LiteDetails::getReleaseDate()
Decoded version of the date the product was or is supposed to be released to the market.
LiteDetails::getStatus()
Indicates if any errors were encountered while processing the service request.
LiteDetails::getURL()
Can generate a hyperlink to the product details page at Amazon, or simply return the URL to this page.
LiteDetails::getUsedPrice()
The lowest used price in Amazon Marketplace.

Class: AmazonItem

AmazonItem::getASIN()
Fetches the product's ASIN, or Amazon Standart Item Number.
AmazonItem::getListPrice()
The listed price of the item including its currency symbol.
AmazonItem::getOurPrice()
The price offered by Amazon for this product including its currency symbol.
AmazonItem::getProductName()
Decodes the product's name.
AmazonItem::getSavings()
Calculates the difference between Amazon's price and the list price.

Class Details [line 76]

The HeavyDetails class is used to store information on products returned when doing a heavy request to AWS.

This class is an extention of LiteDetails and contains the following additional information:

  • A list of ASINs for Accessories that go with the current product (getAccessories())
  • The appropriate Age Level (for toys) (getAgeGroup())
  • A List of Browse Nodes in which the current product is contained. Read the documentation of this method for more information on the format of browse nodes. (getBrowseNode())
  • A list of Directors for the DVD or video (getDirectors())
  • The Distributor of a film (getDistributor())
  • The Encoding of a DVD or video (getEncoding())
  • The ESRB Rating for a computer or video game. Read the documentation of this method for more information on ESRB ratings. (getEsrbRating())
  • A list of Features for the current product (getFeatures())
  • The book's ISBN. (getISBN())
  • A list of Listmania! lists that contain the current product. Note, however, that Listmania! searches are not yet supported by amazOOP. (getList())
  • The product's Medium (i.e. paperback, audio-CD, etc.) (getMedia())
  • The MPAA Rating for a DVD or video. Read the documentation for this method for more information on MPAA ratings. (getMpaaRating())
  • The Manufacturer Product Number (getMPN())
  • The products Medium in numerical form (getNumMedia())
  • Computer of video game Platforms that support the product (getPlatforms())
  • Amazon's editorial Review of the product (getProductDescription())
  • The Publisher of a book (getPublisher())
  • Children books Reading Level (getReadingLevel())
  • Customer Reviews and ratings. Read the documentation of this method for more information about the format of customer reviews. (getReviews())
  • Product sales ranking at Amazon (getSalesRank())
  • List of ASINs for Similar products (getSimilarProducts())
  • List of Actors and Actresses starring in a DVD or video (getActors())
  • Date on which a DVD or video was or will be realeased in the theatres (getTheatricalReleaseDate())
  • Price of the same item, sold new by a Third Party seller. Note, however, that Third Party searches are not yet supported by amazOOP. (getNewPrice())
  • Price of the same item, sold refurbished by a Third Party seller. Note, however, that Third Party searches are not yet supported by amazOOP. (getRefurbishedPrice())
  • Price of the same item, sold as collectible by a Third Party seller. Note, however, that Third Party searches are not yet supported by amazOOP. (getCollectiblePrice())
  • List of Tracks of a CD (getTracks())
  • UPC code of the product. Read the documentaion of this method to learn which items return a UPC code. (getUPC())




Tags:

Version:  0.3RC1
  
License:  GNU Public License
  
Copyright:  2004 (c) Mauricio Diaz Orlich
  
Author:  Mauricio Diaz <madd0@users.sourceforge.net>


[ Top ]


Class Methods


method getAccessories [line 827]

string|boolean getAccessories( [integer $access = 0])

Gets ASINs of accessories for the current product.

As far as I know, the maximum number of ASINs resturned is 5, but as usual, this is not well documented.




Tags:

Return:  the ASIN of the requested accessory from the list, or false if the requested position of the list does not contain an ASIN.


Parameters:

integer   $access   the accessory you want to get. If set to 0 (default), a random ASIN from the list is returned.

[ Top ]

method getActors [line 267]

string|boolean getActors( [integer $howmany = 0], [string $separator = ", "], [string $etc = "et al."], [string $template = "%name%"])

Displays the actors and actresses of a DVD or video.

You can specify how many actors you want to display, what character(s) should separate each name and what should be appended at the end of the list if there are more artists than were displayed.

Additionally, since version 0.2, you can add a template that will be applied to each name. This allows to create links, and apply other html transformation to each name in the list.




Tags:

Return:  A list of actors. Or false if there are no actors.


Parameters:

integer   $howmany   indicates how many actors you want to display. If the value is zero or is greater than the total number of available artists, all actors are displayed.
string   $separator   determines what character(s) separate each name. The default value is a comma followed by a space.
string   $etc   is the text appended to the end of a partial list of actors. The default value is "et al.", but it could be something like "etc.", "and others", etc.
string   $template   a template to be applied to each name on the list. The default value is "%name%" wich will display the name unmodified. You can submit templates such as "%name%", which will display each name in bold characters, but not the separators, or something like "<a href=\"/artist/%rawName%\">%name%</a>", which will create a link to a page using the URL encoded artist's name.

[ Top ]

method getAgeGroup [line 755]

string|boolean getAgeGroup( )

Obtains the appropriate age level for toys.



Tags:

Return:  the age level for toys. Or false if none is set.


[ Top ]

method getAvgReview [line 931]

float getAvgReview( )

Gets the average review given by Amazon customers.

This is a number between 0 and 5. Where 0 doesn't necessariliy mean that the product is terrible, it can also mean that it hasn't been reviewed yet.




Tags:

Return:  the average review given to the product by Amazon customers.


[ Top ]

method getBrowseNode [line 429]

BrowseNode|boolean getBrowseNode( [integer $browseNode = 0])

Obtains a Browse Node in which the object appears from a list of Browse Nodes.

Browse nodes are stored as BrowseNode objects, which contain a node name and a node ID (when such information is provided by AWS).

Currently, AWS is not supposed to return node IDs, but it occasionally does so, especially when querying locales other than "us".

I don't see how node names by themselves could be useful, so I wrote getModeFromCatalog() to use node IDs with getBrowseNode(). Use it, tweak it, and send feedback!!!




Tags:

Return:  the requested browse node from the list, or false if the requested position of the list does not contain a browse node.
  
Since:  version 0.3RC1 BrowseNode objects are returned instead of strings.


Parameters:

integer   $browseNode   the node you want to get. If set to 0 (default), a random node from the list is returned.

[ Top ]

method getCollectiblePrice [line 994]

string|boolean getCollectiblePrice( )

The price offered for a collectible version of this product, including its currency symbol.



Tags:

Return:  Collectible price for the product. Or false if none is set.


[ Top ]

method getCustomerReview [line 970]

CustomerReview|boolean getCustomerReview( [integer $number = 0])

Gets a Customer Review for the current product.

A Customer Review is an object of type CustomerReview which contains the following information:

  • The customer's rating in the scale of 0-5
  • A summary of the customer's review
  • The customer's review
Currently, AWS returns 0-3 reviews for each product.




Tags:

Return:  the requested customer review from the list, or false if the requested position of the list does not contain a review.
  
See:  CustomerReview


Parameters:

integer   $number   the product line you want to get from the list. If set to 0 (default), a random product line from the list is returned.

[ Top ]

method getDirectors [line 320]

string|boolean getDirectors( [integer $howmany = 0], [string $separator = ", "], [string $etc = "et al."], [string $template = "%name%"])

Displays the directors of a DVD or video.

You can specify how many directors you want to display, what character(s) should separate each name and what should be appended at the end of the list if there are more artists than were displayed.

Additionally, since version 0.2, you can add a template that will be applied to each name. This allows to create links, and apply other html transformation to each name in the list.




Tags:

Return:  A list of directors. Or false if there are no directors.


Parameters:

integer   $howmany   indicates how many directors you want to display. If the value is zero or is greater than the total number of available artists, all directors are displayed.
string   $separator   determines what character(s) separate each name. The default value is a comma followed by a space.
string   $etc   is the text appended to the end of a partial list of directors. The default value is "et al.", but it could be something like "etc.", "and others", etc.
string   $template   a template to be applied to each name on the list. The default value is "%name%" wich will display the name unmodified. You can submit templates such as "%name%", which will display each name in bold characters, but not the separators, or something like "<a href=\"/artist/%rawName%\">%name%</a>", which will create a link to a page using the URL encoded artist's name.

[ Top ]

method getDistributor [line 364]

string|boolean getDistributor( )

The distributor of a file



Tags:

Return:  the distributor of a film. Or false if none is set.


[ Top ]

method getEncoding [line 849]

string|boolean getEncoding( )

Obtains the encoding of a DVD or video.



Tags:

Return:  the encoding of a DVD or video. Or false if none is set.


[ Top ]

method getEsrbRating [line 743]

string|boolean getEsrbRating( )

Obtains the ESRB rating for a video game.

ESRB ratings are:

  • EARLY CHILDHOOD: Titles rated EC - Early Childhood have content that may be suitable for ages 3 and older. Contains no material that parents would find inappropriate.
  • EVERYONE: Titles rated E - Everyone have content that may be suitable for persons ages 6 and older. Titles in this category may contain minimal violence, some comic mischief and/or mild language.
  • TEEN: Titles rated T - Teen have content that may be suitable for persons ages 13 and older. May contain violent content, mild or strong language, and/or suggestive themes.
  • MATURE: Titles rated M - Mature have content that may be suitable for persons ages 17 and older. Titles in this category may contain mature sexual themes, more intense violence and/or strong language.
  • ADULTS ONLY: Titles rated AO - Adults Only have content suitable only for adults. Titles in this category may include graphic depictions of sex and/or violence. Adult Only products are not intended for persons under the age of 18.
  • RATING PENDING: Titles listed as RP - Rating Pending have been submitted to the ESRB and are awaiting final rating.




Tags:

Return:  the ESRB rating of a video game. Or false if no rating is set.
  
Link:  ESRB Ratings


[ Top ]

method getFeatures [line 577]

string|boolean getFeatures( [integer $feature = 0])

Gets a feature out of the list of features of an object.



Tags:

Return:  the requested feature from the list, or false if the requested position of the list does not contain a feature.


Parameters:

integer   $feature   the feature you want to get. If set to 0 (default), a random feature from the list is returned.

[ Top ]

method getISBN [line 561]

string|boolean getISBN( )

Retrieves a book's ISBN or International Standard Book Number.



Tags:

Return:  the book's ISBN. Or false if no ISBN is set, which would be the case for all product's which are not books.


[ Top ]

method getList [line 392]

string|boolean getList( [integer $listNumber = 0])

Obtains a Listmania! list in which the object appears.



Tags:

Return:  the requested list ID, or false if the requested list ID does not exist.


Parameters:

integer   $listNumber   the list you want to get. If set to 0 (default), a random list is returned.

[ Top ]

method getMedia [line 465]

string|boolean getMedia( [boolean $showImage = true], [boolean $andText = false])

Retrieves the medium of the product.

The medium can be CD, DVD, VHS, Paperback, Hardcover, etc. You can specify images for each medium by modifying the $media array in config.inc.php. You can also add images for media that do not have any.

The medium can be displayed as an image (if available), as text only, or as both by calling the funcion with different parameters.




Tags:

Return:  the product's medium, either as an image, as text, or both, depending on the parameters sent to the function. Or false if no medium was returned by AWS.


Parameters:

boolean   $showImage   if set to true (default), the function will return an IMG tag displaying the image for the product's medium.
boolean   $andText   if you want to display the image AND the text, you have to set this to true also. If $showImage is set to false, this paramater is not used.

[ Top ]

method getMpaaRating [line 706]

string|boolean getMpaaRating( )

Obtains the MPAA rating for a movie.

MPAA ratings are:

  • G: General Audiences (All ages admitted)
  • PG: Parental Guidance Suggested (Some material may not be suitable for children)
  • PG-13: Parents Strongly Cautioned (Some material may be inappropriate for children under 13)
  • R: Restricted (Under 17 requires accompanying parent or adult guardian)
  • NC-17: No one 17 and under admitted




Tags:

Return:  the MPAA rating of a DVD or video. Or false if no rating is set.
  
Link:  MPAA Movie Ratings


[ Top ]

method getMPN [line 234]

string|boolean getMPN( )

Manufacturer Product Number



Tags:

Return:  the manufacturer product number. Or false if none is set.


[ Top ]

method getNewPrice [line 982]

string|boolean getNewPrice( )

The price offered by a Third Party seller for this product, new, including its currency symbol.



Tags:

Return:  Third Party seller's price for the product. Or false if none is set.


[ Top ]

method getNoOfFeatures [line 599]

integer getNoOfFeatures( )

The total number of features the product has.



Tags:

Return:  The number of features a product has.


[ Top ]

method getNoOfTracks [line 808]

integer getNoOfTracks( )

The total number of tracks the product has.



Tags:

Return:  The number of tracks a product has.


[ Top ]

method getNumMedia [line 547]

string|boolean getNumMedia( )

The product's media in numerical form.



Tags:

Return:  a number representing the product's type in numerical form. Or false if the product's type is not set.


[ Top ]

method getPlatforms [line 624]

string|boolean getPlatforms( [string $separator = ", "], [boolean $showImage = true])

Obtains the list of platforms that support the product.

This can be Operating Systems for software, or Consoles for video games. If a same platform appears several times (e.g. several Windows versions) the platform's name appears once and the different version are grouped inside parenthesis (e.g. Windows (NT, 2000, 98)). This function will create an IMG tag to display the platform's image if such an image was set in the $media array found in the config.inc.php file.




Tags:

Return:  the list of platforms of the current product, either as text or as IMG tags. Or false if no platforms are set.


Parameters:

string   $separator   the character(s) used to separate different platforms. The default is a comma, followed by a space (", ").
boolean   $showImage   if set to true, an IMG tag will be created if there is an image diffined for the platform in the $media array.

[ Top ]

method getProductDescription [line 900]

string|boolean getProductDescription( [integer $words = 0], [string $end = "..."])

Obtains Amazon's Editorial Review for this product.

Not all products return an Editorial Review.

Also, note that the Editorial Review (or Product Description) IS NOT the same as the Publisher's Description that appears on the Amazon sites for some books.




Tags:

Return:  Amazon's Editorial Review for the current product, or at least the number of words requested. Or false if no review is available.


Parameters:

integer   $words   the number of words you want to get, or 0 if you want the whole description.
string   $end   the character(s) to be appended at the end of the description in case the whole text is not returned.

[ Top ]

method getPublisher [line 528]

string|boolean getPublisher( [string $template = "%name%"])

Displays the publisher of a book.

Since version 0.2, you can add a template that will be applied to the publisher's name. This allows to create links, and apply other html transformatin to each name in the list.




Tags:

Return:  the publisher's name, eventually modified by a template. Or false if no publisher was returned by Amazon.


Parameters:

string   $template   a template to be applied to the publisher's name. The default value is "%name%" wich will display the name unmodified. You can submit templates such as "%name%", which will display each name in bold characters, but not the separators, or something like "<a href=\"/publisher/%rawName%\">%name%</a>", which will create a link to a page using the URL encoded publisher's name.

[ Top ]

method getReadingLevel [line 504]

string|boolean getReadingLevel( )

Reading level for children's books



Tags:

Return:  the reading level for children's books. Or false if no level was returned.


[ Top ]

method getRefurbishedPrice [line 1006]

string|boolean getRefurbishedPrice( )

The price offered for a refurbished version of this product, including its currency symbol.



Tags:

Return:  Refurbished price for the product. Or false if none is set.


[ Top ]

method getSalesRank [line 376]

string|boolean getSalesRank( )

Sales rank of this product at Amazon



Tags:

Return:  the sales rank of the product. Or false if none is set.


[ Top ]

method getSimilarProducts [line 865]

string|boolean getSimilarProducts( [integer $product = 0])

Gets ASINs of other products sold at Amazon that are similar to the current product.



Tags:

Return:  the ASIN of the requested product from the list, or false if the requested position of the list does not contain an ASIN.


Parameters:

integer   $product   the ASIN you want to get. If set to 0 (default), a random ASIN from the list is returned.

[ Top ]

method getTheatricalReleaseDate [line 352]

string|boolean getTheatricalReleaseDate( )

Date of the theatrical release of a DVD or video



Tags:

Return:  the date of the theatrical release. Or false if none is set.


[ Top ]

method getTotalReviews [line 944]

integer getTotalReviews( )

Gets the total number of reviews this item has received, which is not necessarily the number of reviews returned, since currently AWS returns at the most 3 reviews.



Tags:

Return:  the total number of reviews received by the product.


[ Top ]

method getTracks [line 786]

string|boolean getTracks( [integer $trackNo = 0])

Gets the name of a track out of the list of tracks in a CD.



Tags:

Return:  the requested track from the list, or false if the requested position of the list does not contain a track.


Parameters:

integer   $trackNo   the track you want to get. If set to 0 (default), a random name from the list is returned.

[ Top ]

method getUPC [line 770]

string|boolean getUPC( )

Get the UPC code of a product.

Currently Amazon only returns UPC codes for items in the music category. Although, lately I've seen UPC codes returned for other objects too.




Tags:

Return:  the products UPC code. Or false if none is set.


[ Top ]

 
Documentation generated on Sat, 21 Aug 2004 17:40:33 +0200 by phpDocumentor 1.3.0RC3
hosted by
SourceForge.net Logo