Thursday, May 3, 2012

[YouTube-API] Re: Feed that only shows X amount of views criteria

Hello Rob,

It's possible to use the "field" parameter to request a partial
response, which will exclude any entries that don't match the criteria
you specify. There's an example in the docs that shows how this could
be used with view counts:

https://developers.google.com/youtube/2.0/developers_guide_protocol_partial#Submitting_Partial_Feed_Request

It's important to note that this filtering takes place *after* the
results are fetched from the search index. So, for example, if a feed
would normally have 25 entries and 15 of those entries have view
counts lower than what you specify in "fields", you'll only see 10
entries in the response feed that's returned to your application. So
you need to be prepared to get back a number of entries in your
response feed that is equal to or less than the number of entries
you'd otherwise get, including the possibility that you'd get back 0
entries. Getting back 0 entries in this case wouldn't necessarily mean
that you've reached the last page of results; you should always
following the guidelines here for determining when there are no more
results:

https://developers.google.com/youtube/2.0/reference#Paging_through_Results

Cheers,
-Jeff Posnick, YouTube API Team
groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |
@YouTubeDev


On Apr 29, 9:31 pm, robnjit <robn...@gmail.com> wrote:
> Hi everyone,
>
> is there a way to create a video feed that only shows videos that have
> X number of views or more?
>
> Thank you,
>
> I appreciate any advice or help.
>
> rob

--
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