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

Library seems limited #4

Open
martinbean opened this issue Nov 7, 2013 · 8 comments
Open

Library seems limited #4

martinbean opened this issue Nov 7, 2013 · 8 comments

Comments

@martinbean
Copy link

This library seems limited. For example, I want to fetch my public uploads. Looking through the public methods in the class I can’t do this. I can’t even craft my own request, because the api_get() method’s visibility is set to private.

It would be good if more public methods were created for all scenarios, or the visibility of the api_get() method being changed to public so developers could craft their own requests where the library is unable to offer its own, built-in shortcut method.

@madcoda
Copy link
Owner

madcoda commented Nov 13, 2013

thanks for your suggestions, I will add it soon.

@madcoda
Copy link
Owner

madcoda commented Nov 13, 2013

I have made api_get public. You may craft your own request, but please post suggestions here or pull request if you find any features missing, to help me improve this API and also benefits other people!

For fetching your public uploads, I couldn't find how to achieve this neither looking at the Google's api doc. Do you have any clues?

I suppose you can still use the Search API to sort of do this:

$myVideos = $youtube->searchChannelVideos('', '/* YOUR CHANNEL ID */', 999, 'date');

@martinbean
Copy link
Author

Thanks, @madcoda.

RE: user’s uploads, YouTube’s API is poorly-designed in that you first need to query the authenticating user’s channels (which will list any channels they own as well as related playlists such as the uploads playlist), and then fetch the items from the uploads playlist you want; two API calls in total.

You can find code samples in YouTube’s documentation for this flow: https://developers.google.com/youtube/v3/code_samples/php#retrieve_my_uploads

Hope that helps.

@minedun6
Copy link

I am working on improving a laravel Youtube Api package, it is true that the Api is a bit complexe to work with, but it's the only way to make your stuff work, there are things that needs to be added, there is also lots of code just to make a simple action and lots of others undocumented things !!

@madcoda
Copy link
Owner

madcoda commented Sep 1, 2014

@minedun6 Hi, Are you trying to integrate this library in Laravel, or are you working with the Google API client?

I am planning to add more integration with Laravel (adding Providers, Config files etc) base on the current code, but I haven't decided to do it in this repo or create a new one. If you are using this Repo please let me know, see how we can collaborate on it. :)

@martinbean
Copy link
Author

@madcoda It may be worth taking a leaf out of Amazon’s book if you’re planning on adding more integration with Laravel.

For their AWS SDK, Amazon have their core library (https://github.com/aws/aws-sdk-php) that can be used with any PHP project managing their dependencies with Composer. They then have a separate repository (https://github.com/aws/aws-sdk-php-laravel) that can be used as a Laravel package that includes the SDK, but also has the facade and service provider class to register it with Laravel’s IoC container.

This may a good way to go, avoiding making this package Laravel-specific.

@minedun6
Copy link

minedun6 commented Sep 1, 2014

@madcoda, Yes and no, I am scrutting the net to see some fun functionalities and add them to an already existing laravel Youtube, but this library only have Upload/GetVideos functionalities and that's too small for the Youtube Api and the other problem is that even after releasing the V3, there is still some undocumented resources, such as, retreiving viewCount/Likes/dislikes/comments of a particular playlistitem, so yeah, I would love to tag along with you to add more functionalities !!
here's the repo I'm working a bit with for now :
https://github.com/FbF/Laravel-Youtube
here's my coordinates
skype: minedun6,
facebook: https://www.facebook.com/yassine.benslimane.3

@lismansihotang
Copy link

hi, how about to use this with CI framework??

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

4 participants