kylejginavan / youtube_it

An object-oriented Ruby wrapper for the YouTube GData API
http://groups.google.com/group/ruby-youtube-library
595 stars 223 forks source link

Youtube V2 API Deprecated #210

Open KieranP opened 10 years ago

KieranP commented 10 years ago

As of March 4th, 2014, the Youtube v2 API is now deprecated. https://developers.google.com/youtube/2.0/developers_guide_protocol_audience

It would be great to have YoutubeIt be upgraded for v3 before the v2 API is shut down (1 year from now).

Google has released a Ruby API which might help: https://github.com/google/google-api-ruby-client

mahhek commented 10 years ago

Agreed, rather needed as comments system has already stopped working.

datnt commented 10 years ago

Hi KieranP & mahhek,

Today, I redo a demo project, in which I used "omniauth-youtube" for authentication, and "youtube_it" for uploading.

I know that API ver2 is deprecated. But somehow, these 2 gems did it work, and everything working fine.

Authentication worked; Upload video workded;

I don't know whether youtubeit had supported for API version 3?

Please help me clarify this, because for this demo project, I reuse the same "dev key" which I created November 2013. I don't know whether it works after deploy to production.

KieranP commented 10 years ago

@datnt The V2 of the API continues to work. but after March 4th, 2015, it will stop working unless this gem is updated.

datnt commented 10 years ago

@KieranP Thank you. I had completed with creating a simple project to authenticate & upload video with youtubev3 today.

I just modify a little bit of code that google introduce: https://developers.google.com/youtube/v3/code_samples/ruby

claudiofullscreen commented 10 years ago

@datnt @KieranP @mahhek you can take a look at https://github.com/Fullscreen/yt and tell me what you guys think :lollipop:

abrisse commented 9 years ago

@claudiofullscreen :+1:

thebravoman commented 9 years ago

I know I should have read it more carefully, but I have lost a number of hours researching youtube_it only to find out at the end that it is using the deprecate Youtube API V2.

Just mention this in the README file.

pivotal-nachos commented 9 years ago

Can someone explain why this got closed? It looks like the README has still not been updated and, as I understand it, we are now one month away from the gem no longer working due to the v2 API going away. Is there an alternative gem to this one besides the generic Google API gem?

thebravoman commented 9 years ago

There is. The Fullscreen/yt gem and it feels much better. But yes, why did this got closed.

teckliew commented 9 years ago

Just making sure... this gem in its current version will not work entirely in a few weeks?

KieranP commented 9 years ago

@mad-tek Youtube is deprecating version 2 of the API, so it may continue to work, but it won't be maintained or supported, and will eventually be shut down. So I recommend looking at https://github.com/Fullscreen/yt - I've just switched our application to use yt and it works really nicely, with more features, less issues, and using v3 of the api, so good for a few more years to come :-)

subimage commented 9 years ago

Is this gem abandoned? Everyone moving to YT instead?

KieranP commented 9 years ago

Yes, fullscreen/yt is the new hotness :-) On 26/04/2015 4:01 PM, "Seth" notifications@github.com wrote:

Is this gem abandoned? Everyone moving to YT instead?

— Reply to this email directly or view it on GitHub https://github.com/kylejginavan/youtube_it/issues/210#issuecomment-96321184 .

teckliew commented 9 years ago

The gem still works. It's just that you need to manually pull the comments and detailed information off of the Youtube API itself.

subimage commented 9 years ago

@mad-tek aware that it works...also aware that Youtube is deprecating the v2 api, which this gem uses.

teckliew commented 9 years ago

@subimage Yea other than that, looks like this gem is abandoned. One of my projects is still using it though.

mahhek commented 9 years ago

Hey, It really stopped working :s , even search methods are also not working, it this gem updated for v3? as to change them in old app will be a mess and have to do much work again. I know Yt is there but any chance of using it by updating? thanks.

claudiofullscreen commented 9 years ago

@mahhek If this can help: https://github.com/Fullscreen/yt/blob/master/YOUTUBE_IT.md

mahhek commented 9 years ago

@claudiofullscreen thanks for the help, yea it helped a bit, but not finding way to do pagination as youtube_it was supporting. Any buddi have any idea about it how to do? Yes the are saying use .first(10) vidoe and it is returning 10 videos but what about offset, how can I select videos from 5th page only?

any idea, thanks in advance.

claudiofullscreen commented 9 years ago

@mahhek YouTube has changed the way in which they paginate the results in their API.

Every time you ask for a page of results (e.g., the 50 most recent videos of a channel), the YouTube API gives you a token that you can use to retrieve the next page (51–100), which in turn has a token that you can use to retrieve the next page (101–150) and so on.

YouTube API V3 does not provide a "direct" way to access, say, the 301th most recent video of a channel without requesting the other ones first. And the maximum number of results per page is 50.

This is documented by YouTube:

The pageToken parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.

The Yt gem does not change this behavior (it can't), but simplifies the task by going through multiple pages on your behalf. This means that if you type channel.videos.first(10), Yt will retrieve the first 10 videos of a channel, and if you type channel.videos.first(60), it will return the first 60 videos.

In the first case, Yt asks YouTube for the first page of results. In the second case, Yt asks YouTube for the first (1–50) and second (51–60) page of results, and combines them for you.

mahhek commented 9 years ago

@claudiofullscreen it means I have to skip the yt gem and have to read youtube api myself for pagination

claudiofullscreen commented 9 years ago

@mahhek I didn't really understand what you are trying to achieve, but if that works better for you, then go for it :+1: