One suggestion

6 views
Skip to first unread message

Smith

unread,
Nov 28, 2010, 9:14:16 PM11/28/10
to Digg API
When I authorize my account, I want to get all my infomation, such as
the count of my news

I submit, count of my comments, count of my save stories, followers,
following and so on.

Through the api now provide, I should make 3 api calls to get this
infomation.

http://services.digg.com/2.0/user.getMyNews
http://services.digg.com/2.0/user.getComments
http://services.digg.com/2.0/user.getInfo
http://services.digg.com/2.0/user.getSavedStories

And after I display another user's infomation, I want to display a
button whether to

follow him/her, I should make anthoer api call. If the api can
integrate these to one

endpoint?

Smith

unread,
Nov 29, 2010, 11:48:51 PM11/29/10
to Digg API
Another question, how to get total count of my news, comments, save
stories?

On 11月29日, 上午10时14分, Smith <6663...@gmail.com> wrote:
> When I authorize my account, I want to get all my infomation, such as
> the count of my news
>
> I submit, count of my comments, count of my save stories, followers,
> following and so on.
>
> Through the api now provide, I should make 3 api calls to get this
> infomation.
>
> http://services.digg.com/2.0/user.getMyNewshttp://services.digg.com/2.0/user.getCommentshttp://services.digg.com/2.0/user.getInfohttp://services.digg.com/2.0/user.getSavedStories

Will

unread,
Nov 30, 2010, 12:12:42 AM11/30/10
to Digg API
We don't have an endpoint which returns those pieces of data, but it's
definitely reasonable for us to return # comments, # diggs, #
submissions along with the other data in /2.0/user.getInfo. I'll look
into this change tomorrow.

Regarding your first suggestion, it's definitely an interesting idea
to combine them into a single API, but it's hard to do without
creating a confusing API (for example, how many comments do you want
to retrieve along with the user? how many saved stories? do we then
add an offset/limit for mynews, comments and saved stories?). If
you're worried about performance, I'd recommend performing the
requests in parallel (via curl_multi in PHP or similar methods in
other languages).

Thanks and let us know if you have other questions!

Will

On Nov 29, 8:48 pm, Smith <6663...@gmail.com> wrote:
> Another question, how to get total count of my news, comments, save
> stories?
>
> On 11月29日, 上午10时14分, Smith <6663...@gmail.com> wrote:
>
>
>
>
>
>
>
> > When I authorize my account, I want to get all my infomation, such as
> > the count of my news
>
> > I submit, count of my comments, count of my save stories, followers,
> > following and so on.
>
> > Through the api now provide, I should make 3 api calls to get this
> > infomation.
>
> >http://services.digg.com/2.0/user.getMyNewshttp://services.digg.com/2...

Will

unread,
Dec 1, 2010, 1:57:59 PM12/1/10
to Digg API
We pushed out the update so user.getInfo returns the # comments, diggs
and submissions for the user. We've also updated the getSavedStories
endpoint to return the total number of saved stories for the user.

Hope these changes help!

Thanks,
Will

Smith

unread,
Dec 2, 2010, 10:55:34 PM12/2/10
to Digg API
I don't see the total count of the getSaveStories endpoing. Is this
change update?

Will

unread,
Dec 7, 2010, 1:59:32 PM12/7/10
to Digg API
Hi Smith,

It should be returning /2.0/user.getSavedStories should now return the
key "num_saved". Could you show me the response value you're seeing
instead?

Thanks,
Will

Smith

unread,
Dec 7, 2010, 8:27:57 PM12/7/10
to Digg API
{
"count": 2,
"timestamp": 1291771425,
"cursor": "20101112213712:1f46ccf7-07de-45fb-8645-f143dd7ea48e",
"version": "2.0",
"stories": [
{
"status": "top",
"permalink": "http://digg.com/news/entertainment/
10_memorable_rap_cd_covers",
"description": "",
"title": "10 Memorable Rap CD Covers",
"url": "http://sokodak.uproxx.com/2010/11/iconic-art-10-
memorable-rap-cd-covers/",
"story_id": "20101112195736:5f0da748-cd51-455a-
ab69-8cc5d43380fd",
"diggs": 108,
"submiter": {
"username": "habschick",
"about": "",
"user_id": "4608387",
"name": "",
"icons": [
"http://cdn1.diggstatic.com/user/4608387/c.png",
"http://cdn3.diggstatic.com/user/4608387/h.png",
"http://cdn3.diggstatic.com/user/4608387/m.png",
"http://cdn1.diggstatic.com/user/4608387/l.png",
"http://cdn3.diggstatic.com/user/4608387/p.png",
"http://cdn2.diggstatic.com/user/4608387/s.png",
"http://cdn1.diggstatic.com/user/4608387/r.png"
],
"gender": "",
"diggs": 8433,
"comments": 49,
"followers": 2829,
"location": "",
"following": 140,
"submissions": 147,
"icon": "http://cdn2.diggstatic.com/user/4608387/
p.png"
},
"comments": 20,
"dugg": 1,
"topic": {
"clean_name": "entertainment",
"name": "Entertainment"
},
"promote_date": 1289632847,
"activity": [],
"date_created": 1289591856,
"thumbnails": {
"large": "http://cdn3.diggstatic.com/story/
10_memorable_rap_cd_covers/l.png",
"small": "http://cdn3.diggstatic.com/story/
10_memorable_rap_cd_covers/s.png",
"medium": "http://cdn2.diggstatic.com/story/
10_memorable_rap_cd_covers/m.png",
"thumb": "http://cdn2.diggstatic.com/story/
10_memorable_rap_cd_covers/t.png"
}
},
{
"status": "top",
"permalink": "http://digg.com/news/politics/
bush_defends_his_legacy_with_subtitles",
"description": "In his new book, Decision Points, George
W. Bush writes about the highs and lows during his Presidency, also
noting mistakes that were made. Former President Bill Clinton praised
the book saying it\u2019s, \u201cwell written and interesting\u201c in
a statement released today. You can judge for yourself and have the
luxury of subtitles....",
"title": "Bush Defends His Legacy (With Subtitles)",
"url": "http://freakoutnation.com/2010/11/12/bush-defends-
his-legacy-with-subtitles/",
"story_id": "20101112213712:1f46ccf7-07de-45fb-8645-
f143dd7ea48e",
"diggs": 117,
"submiter": {
"username": "anomaly100",
"about": "I'm a publisher that Diggs back A LOT & I
Digg my mutual friends' submissions & others.\n\nLet's try to be
respectful in the political comment threads. Digg it?",
"user_id": "3104494",
"name": "Anomaly One Hundred",
"icons": [
"http://cdn1.diggstatic.com/user/3104494/c.
2481541785.png",
"http://cdn2.diggstatic.com/user/3104494/h.
2481541785.png",
"http://cdn3.diggstatic.com/user/3104494/m.
2481541785.png",
"http://cdn3.diggstatic.com/user/3104494/l.
2481541785.png",
"http://cdn3.diggstatic.com/user/3104494/p.
2481541785.png",
"http://cdn2.diggstatic.com/user/3104494/s.
2481541785.png",
"http://cdn2.diggstatic.com/user/3104494/r.
2481541785.png"
],
"gender": "f",
"diggs": 16506,
"comments": 3589,
"followers": 2068,
"location": "I'm right behind you",
"following": 300,
"submissions": 182,
"icon": "http://cdn1.diggstatic.com/user/3104494/p.
2481541785.png"
},
"comments": 28,
"dugg": 0,
"topic": {
"clean_name": "politics",
"name": "Politics"
},
"promote_date": 1289675408,
"activity": [],
"date_created": 1289597832,
"thumbnails": {
"large": "http://cdn1.diggstatic.com/story/
bush_defends_his_legacy_with_subtitles/l.png",
"small": "http://cdn1.diggstatic.com/story/
bush_defends_his_legacy_with_subtitles/s.png",
"medium": "http://cdn3.diggstatic.com/story/
bush_defends_his_legacy_with_subtitles/m.png",
"thumb": "http://cdn3.diggstatic.com/story/
bush_defends_his_legacy_with_subtitles/t.png"
}
}
],
"authorized": 1,
"data": "stories",
"method": "user.getSavedStories",
"user": {
"username": "*****",
"about": "Hello world!",
"user_id": "********",
"name": "*********",
"icons": [
"http://cdn1.diggstatic.com/img/user/c.png",
"http://cdn1.diggstatic.com/img/user/h.png",
"http://cdn2.diggstatic.com/img/user/m.png",
"http://cdn2.diggstatic.com/img/user/l.png",
"http://cdn2.diggstatic.com/img/user/p.png",
"http://cdn3.diggstatic.com/img/user/s.png",
"http://cdn3.diggstatic.com/img/user/r.png"
],
"gender": "m",
"diggs": 73,
"comments": 31,
"followers": 5,
"location": "",
"following": 17,
"submissions": 0,
"icon": "http://cdn1.diggstatic.com/img/user/p.png"

Will

unread,
Dec 8, 2010, 1:23:22 AM12/8/10
to Digg API
Hi Smith,

I misread a bit of the code in my previous fix, so it wasn't much of a
fix. The correct fix is being deployed now and should be available
within two hours on services.digg.com.

Thanks for your patience,
Will
Reply all
Reply to author
Forward
0 new messages