Service: /video/details

0 views
Skip to first unread message

brock

unread,
Jan 6, 2009, 3:01:33 PM1/6/09
to Vodpod API
I'm missing something simple with this service, I just know it.

When I request:
http://api.vodpod.com/api/video/details.xml?video_id=1270005&api_key=my_key
the xml that is returned is for another video from another pod with
the same video_id.

Request:
http://api.vodpod.com/api/video/details.xml?video_id=1270005-yolandas-story&api_key=my_key
strips the "-yolandas-story" out of the request and returns the
details of the other video. But, the <link> to that video is:
http://vodpod.com/watch/782140-hillary-clintons-ny-speech

Requesting that video_id returns a third video.

I'm missing something simple here. pod_id maybe?

A nudge in the right direction would be greatly appreciated.

scott persinger

unread,
Jan 6, 2009, 4:27:18 PM1/6/09
to Vodpod API
The trick here is that internally vodpod stores 2 different video
id's. The one you should be using is a unique id
that identifies a *particular video inside a particular pod*.

We have another id which identifies just a unique video, independent
of any pod. This is the id you'll see in the /watch/
link at vodpod.com. The API is supposed to be based solely on global
id's. This means that you can't
get the id for the video from the link URL. Instead, you have to get
the "video_id" value returned by another
API call.

(Note that it is possible that such a call is returning the wrong id.
If this is the case, please let me know.)

Btw, we've just released a new API test page: http://vodpod.com/site/apitest

This should make testing easier.

--scott

On Jan 6, 12:01 pm, brock <blor...@southwestcirrus.com> wrote:
> I'm missing something simple with this service, I just know it.
>
> When I request:http://api.vodpod.com/api/video/details.xml?video_id=1270005&api_key=...
> the xml that is returned is for another video from another pod with
> the same video_id.
>
> Request:http://api.vodpod.com/api/video/details.xml?video_id=1270005-yolandas...

brock

unread,
Jan 6, 2009, 5:15:54 PM1/6/09
to Vodpod API
That API test page is great!

The video_id I originally used was from another API call:
http://api.vodpod.com/api/video/search.xml?query=barry+cooper&api_key=my_key

Buuuuut :) I just ran that call again, and get a different video_id
which, of course, works as advertised.

Weird. I don't know what I messed up the first time, but thanks for
pointing me in the right direction.

Brock

scott persinger

unread,
Jan 6, 2009, 5:24:15 PM1/6/09
to Vodpod API
That's not your fault! I just fixed that bug recently. (Which is why I
mentioned we might see it again).

Btw, those id's are stable, so generally speaking you should be able
to use them over time.

--scott

On Jan 6, 2:15 pm, brock <blor...@southwestcirrus.com> wrote:
> That API test page is great!
>
> The video_id I originally used was from another API call:http://api.vodpod.com/api/video/search.xml?query=barry+cooper&api_key...
Reply all
Reply to author
Forward
0 new messages