Search:

WikiBoy : Digg

The Digg API (at the time this article was written) has not yet been released. This API allows developers to tap into the core power of Digg.com and integrate their own services with it.

As far as I know, all of this documentation is still valid.

Retrieving Diggs

This is done in order to retrieve a list of the most recently dugg stories.

http://services.digg.com/stories/diggs

This URL will return the data in the following format:

<events offset="0" timestamp="1153930376" total="7792" count="10">
<digg date="1153930365" story="470822" id="26015741" user="Deebz1" status="popular"/>
<digg date="1153930365" story="487304" id="26015740" user="goodoldharris" status="popular"/>
<digg date="1153930364" story="489298" id="26015739" user="Query" status="upcoming"/>
<digg date="1153930364" story="485245" id="26015738" user="enderwigin" status="popular"/>
<digg date="1153930362" story="486592" id="26015737" user="uther" status="popular"/>
<digg date="1153930362" story="487579" id="26015736" user="dtpollitt" status="popular"/>
<digg date="1153930362" story="489335" id="26015735" user="Sithlrd" status="popular"/>
<digg date="1153930361" story="483880" id="26015734" user="tequanne" status="popular"/>
<digg date="1153930361" story="486817" id="26015733" user="shagz7" status="popular"/>
<digg date="1153930360" story="484493" id="26015732" user="tequanne" status="popular"/>
</events>

The Events node

<events offset="0" timestamp="1153930376" total="7792" count="10">
This is the root node. It delivers global information. It's attributes return the following information:
  1. offset: The story that the list starts at. With an offset of 0, the list includes the ten most recently dugg stories. With an offset of 10, the list would return the next 10 most recently dugg stories.
  2. timestamp: A numerical timestamp representing the time the list was generated. It is similar in format to UNIX timestamps.
  3. total: Returns the number of stories total in the Digg database with the attributes specified for the current URL.
  4. count: The number of stories returned

The Digg nodes

<digg date="1153930365" story="470822" id="26015741" user="Deebz1" status="popular"/>
This is a child node. These nodes return information on individual digging instances. It's attributes return the following information:
  1. date: A UNIX-like timestamp which tells when the story was dugg.
  2. story: The ID of the story dugg.
  3. id: The ID of the digg itself.
  4. user: The username of the user that dugg the story.
  5. status: The location of the story. Currently, it has only been observed to be withing the "popular" location and the "upcoming" location.

There are 9 comments on this page. [Display comments]

Page was generated in 0.1370 seconds