You could simulate this behavior by using partial responses, which
are documented here:
http://code.google.com/apis/youtube/2.0/developers_guide_protocol_partial.html
Specifically, look at the syntax example for "date comparison".
Alternatively, you could just request a feed ordered by date, and go
through each video in the feed one by one, looking at the video's
date. If the video is newer than your newest video, add it to your
app. If it's older than you're newest video, stop iterating through
the feed.
Cheers,
-Jeff Posnick, YouTube API Team
groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
@YouTubeDev
On Jan 4, 9:43 pm, Mitch Besser <besse...@gmail.com> wrote:
> I'm trying to load YouTube videos into my Android app. I need to load
> videos that are newer than the most recent video I have saved in my local
> database. I see there's a time parameter for the query as shown here:
>
> http://code.google.com/apis/youtube/2.0/developers_guide_protocol_api...
>
> This is close to what I want, but not good enough. It only describes how to
> make a query based upon, today, this_week, this_month, or all_time. It
> doesn't describe how to make the query as greater_than or less_than a
> specified date/time.
>
> I can't use the today, this_week, this_month, or all_time parameters
> because the user controls when/if the app updates the videos. The user may
> wait months to request an update. The API won't allow the number of records
> returned to exceed 50. There could have been more than 50 videos uploaded
> since the last update request. I need to get the 50 videos newer than the
> newest videos stored, not the newest 50 videos. Otherwise that would leave
> a gap I could never fill.
>
> Also, the user may want to go back in time to view videos uploaded between
> specified dates, but this is of lesser concern as it would be rare.
>
> Is there a query parameter that can achieve this?
>
> Thanks
--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.
No comments:
Post a Comment