First draft of new YouTube API

So not long after I had released my YouTubeCFC wrapper, Google dared to update the API to match the rest of their services. I didn't bother updating my code as I wanted to wait till upload support was done. YouTube now officially allows you to upload (and even update) videos.

I've begun work on rewriting my CFC. It supports basic reading (get top videos for example), but no searching yet. But I did get upload working. Here is an example of how easy it is:

<cfset yt = createObject("component", "youtube")>
<cfset yt.setDeveloperKey("xxx")>

<cfset yt.login("cfjedimaster", "likeidsay")>
<cfset r = yt.upload(expandPath('./movie2.mov'),'Test Upload','Playing with youtube','Music','testing,fun')>
<cfoutput>id=#r#</cfoutput>

I've included the CFC for folks to play with, and once I get a bit more of the API done I'll replace the CFC at RIAForge.

You will need a valid login and a developer key. Also there seems to be a quota limit. I ran into after uploading about 10 videos.

Comments

Jeff's Gravatar They DARED you? I think you should dare THEM to add CF support to Google App Engine.


(PS. Once again, nice work)
# Posted By Jeff | 4/15/08 11:22 PM
Raul Riera's Gravatar CF support for the app engine, that would be something. :( If I could live off dreams...
# Posted By Raul Riera | 4/16/08 2:58 AM
Sam's Gravatar Should I subscribe to Ray's channel?

Hmmmm....

Alright... Woo Hoo! First Subscriber! :-)
# Posted By Sam | 4/17/08 1:03 PM
Jason's Gravatar This page talks about the quotas with the API. There is a 1000 total limit for an account and in that case they recommend you add the video to the user's account. They also recommend passing the users IP in the restriction parameter.

http://code.google.com/support/bin/topic.py?topic=...
# Posted By Jason | 4/17/08 10:47 PM
Frankie's Gravatar It's possible to upload video with this component?
# Posted By Frankie | 1/27/09 10:36 AM
Raymond Camden's Gravatar Yes, please see http://youtubecfc.riaforge.org/ for the latest version.
# Posted By Raymond Camden | 1/27/09 10:39 AM
Frankie's Gravatar It seems that this require a hotfix to work....

In shared hosting it doesn't work...

It's true? or I have to change hosting?
# Posted By Frankie | 1/29/09 9:45 AM
Raymond Camden's Gravatar You can always _ask_ your host to apply the hotfix. But if they won't, then no, you will have to change hosts.
# Posted By Raymond Camden | 1/29/09 10:27 AM
Frankie's Gravatar Hallo Ray,

Thanks for the reply...

I give them the link to the hotfix....

Another question is: how can I post comment?
# Posted By Frankie | 1/30/09 12:59 PM
Raymond Camden's Gravatar While the API supports posting comments, my CFC does not (if I remember right). If you would like it, I could consider adding it, but no promise of when.
# Posted By Raymond Camden | 1/30/09 8:03 PM
Frankie's Gravatar Thank you, Ray...
# Posted By Frankie | 2/1/09 10:54 AM