Ignore:
Timestamp:
Jan 2, 2013, 12:14:42 PM (11 years ago)
Author:
mistic100
Message:

now fetch the good data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/instagram2piwigo/include/Instagram/User.php

    r19561 r19711  
    151151        return new Instagram_Collection_MediaCollection( $this->proxy->getUserMedia( $this->getApiId(), $params ), $this->proxy );
    152152    }
     153   
     154    /**
     155     * Get all user's media
     156     *
     157     * @return Instagram_Collection_MediaCollection
     158     * @access public
     159     */
     160    public function getAllMedia() {
     161        $main = $this->getMedia();
     162        $next = $main->getNext();
     163       
     164        while ( $next !== null ) {
     165            $temp = $this->getMedia( array('max_id' => $next) );
     166            $next = $temp->getNext();
     167            $main->addData( $temp );
     168        }
     169       
     170        return $main;
     171    }
    153172
    154173    /**
Note: See TracChangeset for help on using the changeset viewer.