More YouTube Library Goodness

Posted by shane
on Monday, February 12

I just checked in YouTube Library v0.8.5 to the trunk and uploaded the new gem. It fixes a few bugs that have been bugging you guys for a while, and includes some new methods the guys over at Google/YouTube were kind enough to add. Namely:

- youtube.videos.list\_by\_related (with paging), - youtube.videos.list\_by\_playlist (with paging), - youtube.videos.list\_by\_category (with paging) - youtube.videos.list\_by\_category\_and\_tag (with paging)

The category and tag search will greatly help in filtering out unwanted videos compared to regular tag searches. Tests for these methods have been included too. Just update or install the youtube gem.

I also created a Google Group to discuss issues and bugs. If you are a casual user, developer, or just interested in the progress of this library, please sign up below. All future announcements regarding this library will be posted to the group.

<img src=”http://groups.google.com/groups/img/3/groups_bar.gif” height=26 width=132 alt=”Google Groups Beta”>
Subscribe to Ruby YouTube Library
Email:
Visit this group

YouTube seems to be having some issues with category and category/tag search at the moment, so I commented out those tests. As soon as they fix it, I will uncomment the tests and they should pass. Follow this thread over at the YouTube Developer’s group to learn more.

Related posts:

- [[ANN] YouTube Library 0.8.0 Released](http://shanesbrain.net/articles/2006/11/21/ruby_youtube_library_0_8_0_released) - A Ruby Interface to the YouTube API

Comments

Leave a response

  1. Jon MaddoxFebruary 16, 2007 @ 05:39 AM
    ok, maybe i'm missing something, but all i want to do is to be able to retrieve a video via its id, and have access to its embed_url and url. I used this: youtube = YouTube::Client.new 'XXXX' videodetails = youtube.video_details 'puVWR5CVVig' and got a VideoDetails object, but i want the url of the video, and the embed code for it. How can I get this???
  2. RaselFebruary 23, 2007 @ 08:51 AM
    Man you don't even know how long I've waited for this since disabling my own Movable Type widget (that doesn't work since Haloscan bypasses that code).
  3. shaneFebruary 23, 2007 @ 12:01 PM
    Jon, how are you getting the video id in the first place? If you are using any of the other video list methods, then you already have a list of videos with their embed urls. A VideoDetails object will give you the thumbnail url. I can possibly create a new method on VideoDetails to extract the embed url from the thumbnail url. But it seems redundant if Video already provides it. Btw, please post all questions to the Google Group from now on, since this comment system isn't the best format for Q&A.
  4. ChristophMarch 06, 2007 @ 04:13 AM
    No, please do it :) My users also enter the Video ID, I don't fetch the videos with the Youtube::Client Methods. And it does not seem possible to get the embed_html out of video_details, or instantiate a Video object out of it. A Youtube::Video.new method that instantiates by video ID would be nice. I'm doing this by hand right now.
  5. ChristophMarch 06, 2007 @ 04:13 AM
    No, please do it :) My users also enter the Video ID, I don't fetch the videos with the Youtube::Client Methods. And it does not seem possible to get the embed_html out of video_details, or instantiate a Video object out of it. A Youtube::Video.new method that instantiates by video ID would be nice. I'm doing this by hand right now.
  6. jasonMarch 13, 2007 @ 07:26 AM
    I second this notion. ;) I'm needing to do a "get youtube video by ID" and am running into the same issue. Nice work!
  7. shaneMarch 13, 2007 @ 07:40 AM
    Ok, I'll investigate this for the next release as it is the most requested feature. But if anyone beats me to it, please upload a test-driven patch to the Google Group. Thanks!
  8. BrainMay 08, 2007 @ 01:41 AM
    Wow thanks! I’m a regular reader and enjoy your work. Keep it up!
Comment