YouTube API for Drupal on the Way!


I blogged briefly recently about YouTube’s new and improved API. Soon thereafter, there was a flurry of discussion about creating a Google Summer of Code project to integrate it with Drupal, including a proposal that wasn’t accepted, but I believe nothing further happened from that point.

Until now.

Brad Bowman (beeradb) has stepped up to the plate and created a YouTube API wrapper. He hasn’t released it yet, though he indicated that he plans to early next week. I have had the honor of an early review, and it is nice to work with.

I set it up on a test server, and was able to upload a video to its file directory and have it also uploaded to YouTube, showing up in my user account almost immediately. The API also let me view my YouTube video user feed, so I could verify the results without leaving my site.

Additionally, when retrieving videos, you have access to everything stored at YouTube with that video, including video duration (as shown in the screen shot), description, and user comments.

The next step, after Brad releases the module, will be to integrate it with the other modules that can benefit from it: Embedded Media Field, Media Mover, and others.

The API itself is fairly easy to set up. You first need to get a Developer Key and Client ID from the YouTube Developer’s Dashboard, and paste them into the administration screen for the module. Then you’re off to go! It works out of the box from that point.

The module comes with an example page where you can test everything, although I expect that will be moved to an example module by the time of the release.

This is us moving one step closer to a semantic web, with interchangeable parts seamlessly woven together into a quilted garment that is no longer one-size-fits-all.

(And here’s the video shown in the screenshot, if you’re curious…)