Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order results searchChannelVideos #20

Closed
ghost opened this issue Dec 8, 2015 · 4 comments
Closed

Order results searchChannelVideos #20

ghost opened this issue Dec 8, 2015 · 4 comments

Comments

@ghost
Copy link

ghost commented Dec 8, 2015

Hi !
I have a problem with searchChannelVideos, i can not order the results.
Youtube::searchChannelVideos('video', '.....', $limit, 'date');
The method returns false to me.

'date' it's a valid value after the documentation..
https://developers.google.com/youtube/v3/docs/search/list#order

Thank you !

@alaouy
Copy link
Owner

alaouy commented Dec 13, 2015

@IgorKostine the order by date attribut option works correctly like this :

$videos = Youtube::searchChannelVideos("app", "UCK8sQmJBp8GCxrOtXWBpyEA", 10, 'date');

it returns false only if there are no videos related to the query you passed.

@ghost
Copy link
Author

ghost commented Dec 13, 2015

Thank you for your answer ! :)
But how can I have all the videos of an account from his channel id ?

@alaouy
Copy link
Owner

alaouy commented Dec 13, 2015

This is not explicitly supported with this package, maybe will add it later, for now you can just leave the query parameter empty and it will get you all user videos ordered by date :

  $videos = Youtube::searchChannelVideos("", "UCK8sQmJBp8GCxrOtXWBpyEA", 50, 'date');

@ghost
Copy link
Author

ghost commented Dec 13, 2015

It works !
Thank you very much :)

@ghost ghost closed this as completed Dec 13, 2015
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant