Product

Products are represented as hProducts, a proposed microformat, embedded inside of an XHTML document. In most cases you can access the data through selecting elements based on class. Please refer to the annotated sample response below to see details on each field:

  <!-- products are represented in the API as hproducts -->
  <div class="hproduct">
    
    <!-- the primary maker of the product -->
    <a href="http://localhost:3000/companies/8" class="brand">Apple</a>
    
    <!-- a link to the product resource, as well as the products name -->
    <a href="http://localhost:3000/products/20471" class="name uri">Apple Care</a>

    <!-- A thumbnail image of the product -->
    <img alt="Applecare_small" class="image thumb" src="/uploaded_images/0148/9851/applecare_small.jpg?1204651735" />
    
    <!-- The full description of the product -->
    <p class="description">
      3 year warranty on your apple product
    </p>

    <!-- 
    Navigation links:
    
    rel=topics:  a link to a list of topics that concern this product  
    rel=topics:  a link to a list of companies that a related to (make, provide, use, etc.) this product  
     -->
    <a href="http://localhost:3000/products/20471/topics" rel="topics">Topics associated with Apple Care</a>
    <a href="http://localhost:3000/products/20471/companies" rel="companies">Companies associated with Apple Care</a>

  </div>