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

Youtube V2 API Deprecated #210

Open
KieranP opened this issue Mar 12, 2014 · 22 comments
Open

Youtube V2 API Deprecated #210

KieranP opened this issue Mar 12, 2014 · 22 comments

Comments

@KieranP
Copy link

KieranP commented Mar 12, 2014

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
Copy link

mahhek commented Apr 19, 2014

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

@datnt
Copy link

datnt commented Jun 25, 2014

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
Copy link
Author

KieranP commented Jun 25, 2014

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

@datnt
Copy link

datnt commented Jun 26, 2014

@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
Copy link

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

@abrisse
Copy link
Contributor

abrisse commented Dec 2, 2014

@claudiofullscreen 👍

@thebravoman
Copy link

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
Copy link

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
Copy link

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

@teckliew
Copy link

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

@KieranP
Copy link
Author

KieranP commented Mar 22, 2015

@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
Copy link

Is this gem abandoned? Everyone moving to YT instead?

@KieranP
Copy link
Author

KieranP commented Apr 26, 2015

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
#210 (comment)
.

@teckliew
Copy link

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
Copy link

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

@teckliew
Copy link

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

@mahhek
Copy link

mahhek commented May 8, 2015

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
Copy link

@mahhek
Copy link

mahhek commented May 13, 2015

@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
Copy link

@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
Copy link

mahhek commented May 13, 2015

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

@claudiofullscreen
Copy link

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

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

9 participants