Hi. I was using this great lib and figured out that the getAttributes function was not working when fetching more than one attribute. Here is a little update for your function :
public static function getAttributes($domain, $item, $attributes = null) { $rest = new SimpleDBRequest($domain, 'GetAttributes', 'GET', self::$__accessKey); $rest->setParameter('ItemName', $item); if($attributes !== null) { if(is_array($attributes)) { foreach($attributes as $i=>$name) { $rest->setParameter('AttributeName.'.$i, $name); } } else $rest->setParameter('AttributeName', $attributes); }
Usage : getAttributes("domain","itemName",array("att1","att2"…))
Log in to post a comment.
Hi. I was using this great lib and figured out that the getAttributes function was not working when fetching more than one attribute. Here is a little update for your function :
Usage : getAttributes("domain","itemName",array("att1","att2"…))