identifying videos posted on Digg

17 views
Skip to first unread message

medagan

unread,
Mar 23, 2012, 12:37:33 PM3/23/12
to Digg API Developers Support
Is there a way for me to capture the stream of videos posted here on
Digg: http://digg.com/news/all/videos/recent

Something in .xml form would be awesome

Thanks!

Medagan

Dave Beckett

unread,
Mar 23, 2012, 12:48:19 PM3/23/12
to Digg API Developers Support
Right now the API call that returns top news results
http://developers.digg.com/story-gettopnews does not have a server-
side filter by media type. Plus it does not seem to return the media
type of the item in the response. Oops. This bit I can fix pretty
quickly.

So after I make that change you can use the XML result
http://services.digg.com/2.0/story.getTopNews?type=xml and walk
through that yourself using the cursor mechanism; add query argument
cursor=STORY-ID with the last item's story_id value like this:

http://services.digg.com/2.0/story.getTopNews?type=xml&cursor=STORY-ID

... and get out the items that are videos

I'll reply again when I've updated the service to return the type.

Dave

Dave Beckett

unread,
Mar 23, 2012, 1:07:45 PM3/23/12
to Digg API Developers Support
This just in, getTopNews has an undocumented parameter 'medium' so all
you need is

http://services.digg.com/2.0/story.getTopNews?medium=videos&type=xml

Although the cursor advice still applies.

I'm also making the change to return media_type in responses.

Dave

On Mar 23, 9:37 am, medagan <pjc.2...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages