Whats the rest url to get popular stories AND within last 24hours?

1 view
Skip to first unread message

goodtest

unread,
Jul 26, 2009, 12:20:57 PM7/26/09
to Digg API
I am trying to find API corresponding to http://digg.com/all/popular/24hours
but i just dont what to pass to specify within last 24 hours

http://services.digg.com/stories/popular <?what should be here>

Steve Williams

unread,
Jul 26, 2009, 1:02:08 PM7/26/09
to dig...@googlegroups.com
At 09:20 AM 7/26/2009, goodtest wrote:
>I am trying to find API corresponding to http://digg.com/all/popular/24hours

See the arguments to the List Stories endpoint:

http://apidoc.digg.com/ListStories#Arguments

In particular, min_promote_date.

Here's an example, the stories promoted in the 24 hours before I
wrote this email, more or less:

http://services.digg.com/stories/popular?min_promote_date=1248541291&appkey=http%3A%2F%2Fapidoc.digg.com

goodtest

unread,
Jul 26, 2009, 1:18:15 PM7/26/09
to Digg API
Thanks,
I kind of figured out that min_promote_date and max_promote_date is
the one. But the problem is the results dont match http://digg.com/all/popular/24hours
at all.
the REST url shows stories with 1000s of diggs but via api, it only
returns articles with 300-400 diggs.

I adjusted the epoch time a little bit to around 36 hours, 48 hours
etc but still they dont match.

Also I think max_promote_date is probably what I need since that seems
to return results with more-popular-diggs, although it still dont
match REST url's result.

I hope Digg guys simplify this parameter to say: ?popular=24hours or ?
popular=7days etc

On Jul 26, 10:02 am, Steve Williams <s...@digg.com> wrote:
> At 09:20 AM 7/26/2009, goodtest wrote:
>
> >I am trying to find API corresponding tohttp://digg.com/all/popular/24hours
>
> See the arguments to the List Stories endpoint:
>
> http://apidoc.digg.com/ListStories#Arguments
>
> In particular, min_promote_date.
>
> Here's an example, the stories promoted in the 24 hours before I
> wrote this email, more or less:
>
> http://services.digg.com/stories/popular?min_promote_date=1248541291&...

Jeff Hodsdon

unread,
Jul 26, 2009, 2:18:57 PM7/26/09
to dig...@googlegroups.com
Hi goodtest,

Try the sorting argument. The 'digg_count-desc' should sort the
stories in a descending digg count order, which is what http://digg.com/all/popular/24hours
does.

-jeff

Steve Williams

unread,
Jul 26, 2009, 3:07:28 PM7/26/09
to dig...@googlegroups.com
At 10:18 AM 7/26/2009, goodtest wrote:
>the REST url shows stories with 1000s of diggs but via api, it only
>returns articles with 300-400 diggs.

What Jeff said.

If you want the stories with most diggs to appear at the "top" of the
list, you can add the sort arg:

http://services.digg.com/stories/popular?min_promote_date=1248541291&sort=digg_count-desc&appkey=http%3A%2F%2Fapidoc.digg.com

Otherwise, by default the stories are sorted latest promotion first.

Note also that by default the API returns only the first 10 of the
selected stories. Right now, the above URL selects 85 stories. To
see more than the first 10, use the offset and count args.

goodtest

unread,
Jul 26, 2009, 4:29:10 PM7/26/09
to Digg API
ah. thank you!

On Jul 26, 12:07 pm, Steve Williams <s...@digg.com> wrote:
> At 10:18 AM 7/26/2009, goodtest wrote:
>
> >the REST url shows stories with 1000s of diggs but via api, it only
> >returns articles with 300-400 diggs.
>
> What Jeff said.
>
> If you want the stories with most diggs to appear at the "top" of the
> list, you can add the sort arg:
>
> http://services.digg.com/stories/popular?min_promote_date=1248541291&...
Reply all
Reply to author
Forward
0 new messages