nr1
nr1

Reputation: 777

Youtube Data API: Search for videos, filter by syndicate = true

I'm trying to search for videos on the youtube data api that have the 'syndicate' attribute set to 'allowed' (so they should be allowed to be played on mobile devices).

I tried it that way:

https://gdata.youtube.com/feeds/api/videos?q=music&v=2&prettyprint=true&fields=entry[yt:accessControl/@action='syndicate'](id,title,yt:accessControl)

The return feed looks like this:

<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:yt='http://gdata.youtube.com/schemas/2007'>
<entry>
    <id>tag:youtube.com,2008:video:XXXXXXX</id>
    <title>XXXXXXX</title>
    <yt:accessControl action='comment' permission='allowed'/>
    <yt:accessControl action='commentVote' permission='allowed'/>
    <yt:accessControl action='videoRespond' permission='moderated'/>
    <yt:accessControl action='rate' permission='allowed'/>
    <yt:accessControl action='embed' permission='allowed'/>
    <yt:accessControl action='list' permission='allowed'/>
    <yt:accessControl action='autoPlay' permission='allowed'/>
    <yt:accessControl action='syndicate' permission='denied'/>
</entry>

This is fine, however now I also need to integrate the "permission='allowed'" condition. I already tried it with lots of different combinations (see https://developers.google.com/youtube/2.0/developers_guide_protocol_partial?hl=de#Fields_Formatting_Rules) but wasn't able to get it working. Any hints?

Upvotes: 0

Views: 1036

Answers (1)

Related Questions