Activity
Fetches daily or hourly aggregate user activity from Digg.
Deprecation Warning
The activity endpoints described below are currently deprecated, and may be removed from the Digg API in the near future. The ListEvents endpoints are recommended for forward compatibility. Individual one-hour requests for lists of diggs or comments can simulate one call for aggregate activity. It is not necessary to parse the entire list of returned events to determine activity volume; it is enough to pass count=0 and determine the activity for a given time period based solely on the total attribute of the returned message.
Please substitute with something like this:
NEW Example Request
http://services.digg.com/user/sbwms/diggs?count=0&min_date=1175756400&appkey=http%3A%2F%2Fapidoc.digg.com
NEW Example Responses
XML
<?xml version="1.0" encoding="utf-8" ?>
<events timestamp="1176999607" min_date="1175756400" total="2" offset="0" count="0" />
JSON
{
"timestamp" : 1176999612,
"min_date" : 1175756400,
"total" : "2",
"offset" : 0,
"count" : 0
}
PHP
O:13:"DiggAPIEvents":5:{s:9:"timestamp";i:1176999617;s:8:"min_date";i:1175756400;s:5:"total";s:1:"2";s:6:"offset";i:0;s:5:"count";i:0;}
DEPRECATED Example Request
Retrieve daily digg totals for user sbwms:
http://services.digg.com/user/sbwms/activity/diggs?appkey=http%3A%2F%2Fapidoc.digg.com
DEPRECATED Example Responses
XML
<?xml version="1.0" encoding="utf-8" ?>
<activity timestamp="1176999128" period="client" diggs="4" start="1175199322" end="1176916238">
<activity period="day" start="1175126400" end="1175212799" diggs="1" />
<activity period="day" start="1175212800" end="1175299199" diggs="1" />
<activity period="day" start="1175904000" end="1175990399" diggs="1" />
<activity period="day" start="1176854400" end="1176940799" diggs="1" />
</activity>
JSON
{
"timestamp" : 1176999133,
"period" : "client",
"diggs" : "4",
"start" : 1175199322,
"end" : 1176916238,
"activity" : [
{
"period" : "day",
"start" : 1175126400,
"end" : 1175212799,
"diggs" : 1
},
{
"period" : "day",
"start" : 1175212800,
"end" : 1175299199,
"diggs" : 1
},
{
"period" : "day",
"start" : 1175904000,
"end" : 1175990399,
"diggs" : 1
},
{
"period" : "day",
"start" : 1176854400,
"end" : 1176940799,
"diggs" : 1
}
]
}
PHP
O:15:"DiggAPIActivity":6:{s:9:"timestamp";i:1176999139;s:6:"period";s:6:"client";s:5:"diggs";s:1:"4";s:5:"start";i:1175199322;s:3:"end";i:1176916238;s:8:"activity";a:4:{i:0;O:21:"DiggAPIActivityPeriod":4:{s:6:"period";s:3:"day";s:5:"start";i:1175126400;s:3:"end";i:1175212799;s:5:"diggs";i:1;}i:1;O:21:"DiggAPIActivityPeriod":4:{s:6:"period";s:3:"day";s:5:"start";i:1175212800;s:3:"end";i:1175299199;s:5:"diggs";i:1;}i:2;O:21:"DiggAPIActivityPeriod":4:{s:6:"period";s:3:"day";s:5:"start";i:1175904000;s:3:"end";i:1175990399;s:5:"diggs";i:1;}i:3;O:21:"DiggAPIActivityPeriod":4:{s:6:"period";s:3:"day";s:5:"start";i:1176854400;s:3:"end";i:1176940799;s:5:"diggs";i:1;}}}
Endpoints
- GET /user/{user name}/activity
- All digg and comment activity for a given user.
404 Not Found response if the user does not exist.
- GET /user/{user name}/activity/diggs
- All digg activity for a given user.
404 Not Found response if the user does not exist.
- GET /user/{user name}/activity/comments
- All comment activity for a given user.
404 Not Found response if the user does not exist.
- GET /story/{story id}/activity
- All digg and comment activity for a given story.
404 Not Found response if the story does not exist.
- GET /story/{story id}/activity/diggs
- All digg activity for a given story.
404 Not Found response if the story does not exist.
- GET /story/{story id}/activity/comments
- All comment activity for a given story.
404 Not Found response if the story does not exist.
Arguments
Additional query string parameters to endpoints above. See also ResponseTypes and ApplicationKeys.
- period
- Break activity down into periods.
One of:
hour: Activity broken down into one-hour increments, divisions at the top of the hour.
day: Activity broken down into one-day increments, divisions at midnight UTC.
Default: hour.
- min_date, max_date
- Get activity within a given date range.
Unix epoch integer.
Default: past 30 days if both are omitted.
Date range may not exceed 30 days.
403 Forbidden with explanatory message is returned for range > 30 days.
Comments (0)
You don't have permission to comment on this page.