alaouy / YouTube

🔥 Laravel PHP Facade/Wrapper for the Youtube Data API
MIT License
782 stars 204 forks source link

Pagination with Channels Videos #98

Closed tahirafridi closed 6 years ago

tahirafridi commented 6 years ago

Currently I'm using this way

$videos = Youtube::listChannelVideos(
            'UCAhvLrpJPXBQVFRSyVBxhXw', 1, 'date', ['id', 'snippet'], true
);

This gives me 1 video with nextpage token, now I'm worried about how to pass that next page token to get another video.

I already seen the example you have mentioned on your documentation, but that is for searchAdvance I need it for channel videos. I give it a try but that was broken my code and shows me only 10 results with no order for the channel.

Thanks.

tahirafridi commented 6 years ago

I found the solution, actual listChannelVideos() returning searchAdvanced() method. I hope it will help some other users.