Esempio n. 1
0
 /**
  * Gets the rating given for an item by one or more users, or for the logged in user.
  *
  * Data format:
  * <code>
  * 
  * </code>
  * @param array $iids the items that are being rated
  * @param array $uids optional - the list of users to retrieve ratings for. Defaults to the logged in user if not provided
  * @return array of ratings
  * 
  * public function ratings_get($iids, $uids = null)
  */
 public function execute()
 {
     $ratings = Api_Bo_Ratings::getRatings($this->getAppId(), $this->item_ids, $this->uids);
     $retVal = array();
     if (count($ratings) > 0) {
         $retVal['rating'] = array();
         $i = 0;
         foreach ($ratings as $rating) {
             $retVal['rating'][$i++] = array('uid' => $rating['uid'], 'iid' => $rating['item_id'], 'vote' => $rating['vote']);
         }
     }
     return $retVal;
 }