redoc01
redoc01

Reputation: 2307

Youtube API - How can i retrieve multiple videos in one request using VB.Net?

This question has been killing me, what i want to do is retrieve more than one video from YouTube in one request. now these videos do not belong to a playlist i just want to specify random video ids and request the feed from YouTube using the video ids specified.

I have heard and looked into batch processing with YouTube but i can not find any resource that gives any explanation on how to create batch processing in VB.Net for retrieving videos.

I have seen some flash and PHP code that can answer this question but i need the functionality for VB.Net application.

Can anyone help please?

Thank you

Upvotes: 0

Views: 749

Answers (2)

Michael Pryor
Michael Pryor

Reputation: 25346

Send an api request that looks like this:

<feed>
<batch:operation type="query"/>
<entry>
  <id>http://gdata.youtube.com/feeds/api/videos/123</id>
</entry>
<entry>
  <id>http://gdata.youtube.com/feeds/api/videos/456</id>
</entry>
</feed>

If you include multiple entries in the request, you'll get back multiple video info.

Upvotes: 1

Joel Coehoorn
Joel Coehoorn

Reputation: 415880

Always two there are; no more, no less. A request and a response.

This is internet 101: one http request always yields one http response. If you want more than one video, you must send more than one request. You can hide this from your users by running the requests in a loop or even in parallel, and only showing results after all have completed.

Upvotes: 0

Related Questions