List Events

 


 

Fetches a list of diggs or comments from Digg.

 

Example Request

 

Retrieve some diggs from user kevinrose:

 

http://services.digg.com/user/kevinrose/diggs?min_date=1176760800&appkey=http%3A%2F%2Fapidoc.digg.com  

 

Example Responses

 

XML

 

<?xml version="1.0" encoding="utf-8" ?>
<events timestamp="1176998174" min_date="1176760800" total="19" offset="0" count="10">
 <digg date="1176935035" story="1776206" id="65657478" user="kevinrose" status="upcoming" />
 <digg date="1176917530" story="1797248" id="65602282" user="kevinrose" status="upcoming" />
 <digg date="1176917246" story="1795682" id="65601396" user="kevinrose" status="popular" />
 <digg date="1176877849" story="1786809" id="65528931" user="kevinrose" status="popular" />
 <digg date="1176877580" story="1790457" id="65528556" user="kevinrose" status="popular" />
 <digg date="1176877472" story="1794432" id="65528395" user="kevinrose" status="popular" />
 <digg date="1176857787" story="1792060" id="65485850" user="kevinrose" status="popular" />
 <digg date="1176850782" story="1781720" id="65468359" user="kevinrose" status="popular" />
 <digg date="1176848403" story="1780680" id="65461429" user="kevinrose" status="popular" />
 <digg date="1176847067" story="1789199" id="65457469" user="kevinrose" status="upcoming" />
</events>

 

JSON

 

{
	"timestamp" : 1176998180,
	"min_date" : 1176760800,
	"total" : "19",
	"offset" : 0,
	"diggs" : [
		{
			"date" : 1176935035,
			"story" : 1776206,
			"id" : 65657478,
			"user" : "kevinrose",
			"status" : "upcoming"
		},
		{
			"date" : 1176917530,
			"story" : 1797248,
			"id" : 65602282,
			"user" : "kevinrose",
			"status" : "upcoming"
		},
		{
			"date" : 1176917246,
			"story" : 1795682,
			"id" : 65601396,
			"user" : "kevinrose",
			"status" : "popular"
		},
		{
			"date" : 1176877849,
			"story" : 1786809,
			"id" : 65528931,
			"user" : "kevinrose",
			"status" : "popular"
		},
		{
			"date" : 1176877580,
			"story" : 1790457,
			"id" : 65528556,
			"user" : "kevinrose",
			"status" : "popular"
		},
		{
			"date" : 1176877472,
			"story" : 1794432,
			"id" : 65528395,
			"user" : "kevinrose",
			"status" : "popular"
		},
		{
			"date" : 1176857787,
			"story" : 1792060,
			"id" : 65485850,
			"user" : "kevinrose",
			"status" : "popular"
		},
		{
			"date" : 1176850782,
			"story" : 1781720,
			"id" : 65468359,
			"user" : "kevinrose",
			"status" : "popular"
		},
		{
			"date" : 1176848403,
			"story" : 1780680,
			"id" : 65461429,
			"user" : "kevinrose",
			"status" : "popular"
		},
		{
			"date" : 1176847067,
			"story" : 1789199,
			"id" : 65457469,
			"user" : "kevinrose",
			"status" : "upcoming"
		}
	],
	"count" : 10
}

 

PHP

 

O:13:"DiggAPIEvents":6:{s:9:"timestamp";i:1176998185;s:8:"min_date";i:1176760800;s:5:"total";s:2:"19";s:6:"offset";i:0;s:5:"diggs";a:10:{i:0;O:11:"DiggAPIDigg":5:{s:4:"date";i:1176935035;s:5:"story";i:1776206;s:2:"id";i:65657478;s:4:"user";s:9:"kevinrose";s:6:"status";s:8:"upcoming";}i:1;O:11:"DiggAPIDigg":5:{s:4:"date";i:1176917530;s:5:"story";i:1797248;s:2:"id";i:65602282;s:4:"user";s:9:"kevinrose";s:6:"status";s:8:"upcoming";}i:2;O:11:"DiggAPIDigg":5:{s:4:"date";i:1176917246;s:5:"story";i:1795682;s:2:"id";i:65601396;s:4:"user";s:9:"kevinrose";s:6:"status";s:7:"popular";}i:3;O:11:"DiggAPIDigg":5:{s:4:"date";i:1176877849;s:5:"story";i:1786809;s:2:"id";i:65528931;s:4:"user";s:9:"kevinrose";s:6:"status";s:7:"popular";}i:4;O:11:"DiggAPIDigg":5:{s:4:"date";i:1176877580;s:5:"story";i:1790457;s:2:"id";i:65528556;s:4:"user";s:9:"kevinrose";s:6:"status";s:7:"popular";}i:5;O:11:"DiggAPIDigg":5:{s:4:"date";i:1176877472;s:5:"story";i:1794432;s:2:"id";i:65528395;s:4:"user";s:9:"kevinrose";s:6:"status";s:7:"popular";}i:6;O:11:"DiggAPIDigg":5:{s:4:"date";i:1176857787;s:5:"story";i:1792060;s:2:"id";i:65485850;s:4:"user";s:9:"kevinrose";s:6:"status";s:7:"popular";}i:7;O:11:"DiggAPIDigg":5:{s:4:"date";i:1176850782;s:5:"story";i:1781720;s:2:"id";i:65468359;s:4:"user";s:9:"kevinrose";s:6:"status";s:7:"popular";}i:8;O:11:"DiggAPIDigg":5:{s:4:"date";i:1176848403;s:5:"story";i:1780680;s:2:"id";i:65461429;s:4:"user";s:9:"kevinrose";s:6:"status";s:7:"popular";}i:9;O:11:"DiggAPIDigg":5:{s:4:"date";i:1176847067;s:5:"story";i:1789199;s:2:"id";i:65457469;s:4:"user";s:9:"kevinrose";s:6:"status";s:8:"upcoming";}}s:5:"count";i:10;}

 

Endpoints

 

Events are a combination of diggs and comments.

 

GET /stories/diggs
All diggs.
GET /stories/popular/diggs
All diggs on popular stories.
GET /stories/upcoming/diggs
All diggs on upcoming stories.
GET /story/{story id}/diggs
All diggs for a given story.
404 Not Found response if the story does not exist.
GET /stories/{comma-separated list of story ids}/diggs
All diggs for a list of stories with the given ids. (E.g., GET /stories/984,1489,8575,174/diggs)
GET /user/{user name}/diggs
One user's diggs for all stories.
404 Not Found response if the user is unknown.
GET /users/{comma-separated list of user names}/diggs
Several users' diggs for all stories. (e.g. GET /users/sbwms,kevinrose/diggs) At most 100 user names may be listed.
404 Not Found response if any of the users is unknown.
GET /story/{story id}/user/{user name}/digg
One user digg for a given story.
404 Not Found response if the user has not dugg the story.
GET /stories/comments
All comments.
GET /stories/popular/comments
All comments on popular stories.
GET /stories/upcoming/comments
All comments on upcoming stories.
GET /stories/{comma-separated list of story ids}/comments
All comments for a list of stories with the given ids. (e.g. GET /stories/984,1489,8575,174/comments) At most 100 story ids may be listed
GET /story/{story id}/comments
Top-level comments for a given story.
404 Not Found response if the story does not exist.
GET /user/{user name}/comments
One user's comments for all stories.
404 Not Found response if the user does not exist.
GET /users/{comma-separated list of user names}/comments
Several users' comments for all stories. (e.g. GET /users/sbwms,kevinrose/comments) At most 100 user names may be listed.
404 Not Found response if any of the users is unknown.
GET /story/{story id}/comment/{comment id}
One comment for a given story.
404 Not Found response if the story or comment do not exist.
GET /story/{story id}/comment/{comment id}/replies
One level of replies to one comment for a given story.
404 Not Found response if the story or comment do not exist.

 

Arguments

 

Additional query string parameters to endpoints above. See also ResponseTypes and ApplicationKeys.

min_date, max_date
Get events within a time period.
  • Values: Unix epoch integer.
  • Limits:
    • No limit in the following cases:
      • If one or more story IDs is specified.
      • If exactly one username is specified.
      • If a comment ID is specified.
    • Otherwise: One hour.
  • Defaults:
    • All time, in the following cases:
      • If one or more story IDs is specified.
      • If exactly one username is specified.
      • If a comment ID is specified.
    • Otherwise:
      • If both omitted: The last hour before the request.
      • If only min_date specified: One hour starting at the min_date.
      • If only max_date specified: One hour before the max_date.
sort
How to sort returned events.
One of:
date-desc: newest first (default).
date-asc: oldest first.
count
Number of events to retrieve.
Event count integer.
Default: 25, Maximum: 100.
offset
Offset in complete events list.
Event offset integer.
Default: 0.
media
Return events of selected media.
One of:
all: All media (default).
{medium}: The indicated medium.
{comma-separated list of media}: Any of the indicated media.
Each medium in must be the short_name attribute of one of the media returned by the List Media (link) endpoint, e.g. news, videos, or images.


Page Information

  • 7 months ago [history]
  • View page source
  • You're not logged in
  • No tags yet learn more

Wiki Information

Recent PBwiki Blog Posts