Source for file TheTenWordReview.php

Documentation is available at TheTenWordReview.php

  1. <?php
  2.     /**
  3.      * 
  4.      * SWX thetenwordreview.com API by Carin Campanario and Steve Webster.
  5.      * 
  6.      * You can call this API using SWX, Amfphp, JSON and XML-RPC.
  7.      * 
  8.      * @author Carin Campanario
  9.      * @author Steve Webster
  10.      * @copyright    2007 Aral Balkan. All Rights Reserved.
  11.      * @link     http://thetenwordreview.com
  12.      * @link     http://thetenwordreview.com/api
  13.      * @link     http://ccampanario.com
  14.      * @link     http://dynamicflash.com
  15.      * @link    mailto://carin@tui.co.uk
  16.      * @link    mailto://steve@dynamicflash.com
  17.      * @link     http://swxformat.org
  18.      * 
  19.     ***/
  20.     
  21.     // Require base service class
  22.         require_once("../BaseService.php");
  23.  
  24.     /**
  25.      * SWX thetenwordreview.com API by Carin Campanario & Steve Webster. You can call this API using SWX, Amfphp, JSON and XML-RPC.
  26.     **/
  27.  
  28.     class TheTenWordReview extends BaseService
  29.     {
  30.     
  31.         /**
  32.          * Returns the requested number of photos for the specified user.
  33.          * 
  34.          * @param    API key for thetenwordreview.com. Required.
  35.          * @param     The username of the user you want reviews by. Optional - defaults to all users.
  36.          * @param    The category that you want reviews for Optional - defaults to all categories.
  37.          * @param    The subject that you want reviews for. Optional - defaults to all subjects.
  38.          * @param    The number of reviews you want returned. Max 30. Optional - defaults to 10.
  39.          * @param    The order in which you want reviews returned. Can be either 'p' for popularity
  40.          *           or 'd' for date. Defaults to an API-determined order dependant on the other
  41.          *           parameters.
  42.          *
  43.          * @return An array of reviews matching the specified criteria.
  44.          * @author Carin Campanario
  45.          * @author Steve Webster
  46.          * 
  47.          *  output:
  48.         ***/
  49.         function getReviews ($key$user = NULL$cat = NULL$review = NULL$num = NULL$order = NULL)
  50.         {
  51.             $url 'thetenwordreview.com/api/reviews/get';
  52.  
  53.             $vars = array(
  54.                 'output' => 'php',
  55.                 'key' => $key,
  56.                 'user' => $user,
  57.                 'cat' => $cat,
  58.                 'review' => $review,
  59.                 'num' => $num,
  60.                 'order' => $order
  61.             );
  62.  
  63.             $response $this->_phpCall($url$vars'GET');
  64.  
  65.             return $response;
  66.         }
  67.     }
  68.     
  69. ?>

Documentation generated on Fri, 06 Jul 2007 19:54:53 +0100 by phpDocumentor 1.3.1