コード例 #1
0
 public function liked()
 {
     $liked = $this->check_cache('liked');
     if (!$liked) {
         $liked = \Instagram\Remote::get('https://api.instagram.com/v1/users/self/media/liked', array('data' => array('access_token' => $this->get_config('token'))));
         $this->set_cache('liked', $liked->content);
         $liked = $liked->content;
     }
     return new \Instagram\Liked(json_decode($liked)->data);
 }
コード例 #2
0
ファイル: Query.php プロジェクト: jaakon/KirbyGram
 public function getNext()
 {
     if (!property_exists($this->pagination, 'next_url')) {
         return false;
     }
     $this->response = \Instagram\Remote::get($this->pagination->next_url);
     if ($this->response) {
         $this->content = json_decode($this->response->content);
         $this->page++;
         $this->parsePagination();
         //echo '<pre>' . json_encode($this->content, JSON_PRETTY_PRINT) . '</pre>';
         return true;
     } else {
         return false;
     }
 }