Strict Standards: Declaration of action_plugin_discussion::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/opinian/public_html/wiki/lib/plugins/discussion/action.php on line 16

Strict Standards: Declaration of action_plugin_translation::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/opinian/public_html/wiki/lib/plugins/translation/action.php on line 90

Strict Standards: Declaration of cache_instructions::retrieveCache() should be compatible with cache::retrieveCache($clean = true) in /home/opinian/public_html/wiki/inc/cache.php on line 289

Warning: Cannot modify header information - headers already sent by (output started at /home/opinian/public_html/wiki/lib/plugins/discussion/action.php:16) in /home/opinian/public_html/wiki/inc/auth.php on line 295

Strict Standards: Only variables should be passed by reference in /home/opinian/public_html/wiki/doku.php on line 71

Warning: Cannot modify header information - headers already sent by (output started at /home/opinian/public_html/wiki/lib/plugins/discussion/action.php:16) in /home/opinian/public_html/wiki/inc/actions.php on line 154
items_get_reviews [Opinian API]
 
Translations of this page:

"Items/get_reviews"

Input parameters

parameter name type description mandatory
item_id number Item's Opinian ID no (but then 'slug' and 'category_id' are)
slug string Item's Opinian slug (no control characters, ”-” for spaces) must go in pair with category_id. not mandatory, but then 'item_id' is
category_id number Item's Opinian category ID must go in pair with slug. not mandatory, but then 'item_id' is
page number Page of item reviews. 10 reviews per page. no
order string “last” / “best”. Default is last. no
countries string Filter for reviews user country. Comma separated list of ISO 3166-1 Alpha-2 Country Code. no
languages string Filter for reviews languages. Comma separated list of ISO 639-1 Language Code. no

Input example

<?php
 
$reviews = $Opinian->getRatings(array("slug"=>"paris-hilton", "category_id"=>234, "languages"=>"en,hr"));
if (!empty($Opinian->last_error))
   echo $Opinian->last_error;
else
   print_r($reviews);
 
?>

Result structure

Arrays, data is inside “Rating” array key.

parameter name description
User Array. User that wrote the review. See below.
text Review HTML formated text
created Date and time of review (YYYY-MM-DD, HH:SS)
language ISO 639-1 Language Code
country ISO 3166-1 Alpha-2 Country Code

User” array, inside “Review” array key.

parameter name description
username Username of the user that wrote the review
image url to the thumbnailed user image
profile_url Url to the profile page on Opinian

Result example

Array
(
    [Review] => Array
        (
            [0] => Array
                (
                    [User] => Array
                    (
                         [username] => Pero
                         [image] => http://www.opinian.com/img/profile_man.gif
                         [profile_url] => http://www.opinian.com/account/page/1542
                    )
                    [text] => Paris hilton je jedna <strong>divna</strong> djevojčica.
                    [created] => 2009-08-07, 08:19
                    [language] => hr
                    [country] => hr
                )


            [1] => Array
                (
                    [User] => Array
                    (
                         [username] => Paris Wannabe
                         [image] => http://www.opinian.com/img/profile_woman.gif
                         [profile_url] => http://www.opinian.com/account/page/452
                    )
                    [text] => I really like Paris, and when i grow up i'd like to be JUST like her.
                    [created] => 2009-08-07, 08:19
                    [language] => en
                    [country] => us
                )
         )
)
 
items_get_reviews.txt · Last modified: 2009/09/04 12:31 by edi
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki

Strict Standards: Only variables should be passed by reference in /home/opinian/public_html/wiki/doku.php on line 79