Exemple #1
0
 public function getAlbums($owner_id)
 {
     $this->settings->setAuthPublic();
     $result = new View_List();
     $params = array('owner_id' => $owner_id);
     $recs = $this->call('photos.getAlbums', $params);
     foreach ($recs['response']['items'] as $rec) {
         $post = new View_Post();
         $post->fromArray($rec);
         $result->items[$post->id] = $post;
         $result->count++;
     }
     return $result;
 }
Exemple #2
0
 /**
  * @param array $post_ids
  *
  * @return View_List
  */
 public function getById(array $post_ids)
 {
     $this->settings->setAuthPublic();
     $result = new View_List();
     $empty = new View_Post();
     $params = array('posts' => implode(',', $post_ids), 'extended' => 1, 'copy_history_depth' => 0, 'fields' => $empty->getCustomFields());
     $recs = $this->call('wall.getById', $params);
     foreach ($recs['response']['items'] as $rec) {
         $post = new View_Post();
         $post->fromArray($rec);
         $result->items[$post->id] = $post;
         $result->count++;
     }
     return $result;
 }