Mutual - friend.getAll

9 views
Skip to first unread message

NewToDiggApi

unread,
Nov 1, 2010, 11:59:32 AM11/1/10
to Digg API
Right now the field "mutual" is 1 irrespective of the "mutuality"
between the two users, can that be fixed?

http://developers.digg.com/version1/friend-getall

The round about way is very taxing on the digg servers -- download all
friends & fans for a given user and then process it.

Will

unread,
Nov 27, 2010, 12:53:19 PM11/27/10
to Digg API
We'll get started on fixing this. It's likely fixing this issue won't
substantially reduce server load for this usecase, but it certainly
does provide a much cleaner API.

Thanks,
Will

NewToDiggApi

unread,
Nov 27, 2010, 4:35:12 PM11/27/10
to Digg API
Thanks very much.

I have a few more questions:

1. Do you know how can I find the relationship between any given two
users (A or B)? Much like what Twitter API would offer. Ideally, a
dedicated method for this would be best. Right now, the only method I
can think of is, download the list of all friends for one of the user
(lets say A) and with the above fix you are going to do -- an answer
can be found (here again if B is not in the friend list of A, friend
list of B should be downloaded as well).

Alternatively, when an authenticated user is using the API, anywhere a
username field is occuring, an accompanying relationship field (ie
mutual/fan/friend) would be awesome.

2. Not related to the friends topic at all. What is the efficient way
to find if a user has dugg a story? Use case: If I were to implement a
button (much like the digg widget button), I need to know if the user
has already dugg. Only way I can think of is, download the recent X
diggs of the user, but then if I hit on a story several months old,
this method would not work. In this situation, for every story the
user visits, all the diggs on the story need to be downloaded to see
if the user is present. This situation can be in cases where a
username is provided or an oAuth authenticated user is present.

Thanks!

Will

unread,
Nov 28, 2010, 12:42:25 PM11/28/10
to Digg API
These sound like reasonable endpoints to add for authenticated users.
(I'll have to spend some more time considering the privacy
implications for a non-authenticated endpoint, but I haven't thought
of any immediate reasons why we couldn't have a non-auth'd version as
well.)

Is there something specific about the button's you're trying to fix
which we should be looking into as well?

Thanks!
Will

NewToDiggApi

unread,
Nov 28, 2010, 4:35:45 PM11/28/10
to Digg API
Just a use case, let's say I am trying to do a clone of the digg
website (using digg data) -- much like the digglite example. In this
case, the default digg buttons (widget) can be used, but then clicking
the button will bring a pop-up from the digg website and so
on ............ If I want the oAuth authenticated user to digg a story
without leaving the site he/she is in and not opening a pop-up from
digg.com, my own custom button which connects to the server side code
to digg the story is needed. At this juncture, it is best to let know
the user if they already dugg a story or not.

If I am not clear, please let me know and I can elaborate.

Thanks!

Will

unread,
Nov 30, 2010, 12:25:34 AM11/30/10
to Digg API
Absolutely makes sense. We'll take a stab at adding these endpoints
tomorrow or Wednesday.

Thanks,
Will

Will

unread,
Dec 1, 2010, 5:11:13 PM12/1/10
to Digg API
The /2.0/digg.hasDugg endpoint is out in the wild:
http://developers.digg.com/version2/digg-hasdugg

curl "services.digg.com/2.0/digg.hasDugg?
username=lethain&story_ids=20101201142025:948e1c02-ed83-4063-9f0a-
e7d60dcd1a5f,some-fake-story-id"
{
"count": 2,
"timestamp": 1291241316,
"cursor": "",
"version": "2.0",
"stories": {
"20101201142025:948e1c02-ed83-4063-9f0a-e7d60dcd1a5f": false,
"some-fake-story-id": false
},
"authorized": "0",
"data": "stories",
"method": "digg.hasDugg",
"user": {
"username": "lethain",
"about": "Software developer at Digg.",
"user_id": "1659849",
"name": "",
"icons": [
"http://cdn3.diggstatic.com/user/1659849/c.png",
"http://cdn1.diggstatic.com/user/1659849/h.png",
"http://cdn3.diggstatic.com/user/1659849/m.png",
"http://cdn2.diggstatic.com/user/1659849/l.png",
"http://cdn2.diggstatic.com/user/1659849/p.png",
"http://cdn1.diggstatic.com/user/1659849/s.png",
"http://cdn3.diggstatic.com/user/1659849/r.png"
],
"gender": "",
"diggs": 836,
"comments": 47,
"followers": 72,
"location": "San Francisco",
"following": 75,
"submissions": 108,
"icon": "http://cdn3.diggstatic.com/user/1659849/p.png"
}
}

Will take a look at mutuality next.

Thanks,
Will

Will

unread,
Dec 1, 2010, 5:49:22 PM12/1/10
to Digg API
The mutuality fix is going out as well. Updated version should be
available and cached data expired in about an hour.

Thanks,
Will

LtGenPanda

unread,
Dec 3, 2010, 11:21:11 AM12/3/10
to Digg API
Wow awesome, thanks for the new method and the mutuality fix!

LtGenPanda

unread,
Dec 3, 2010, 11:50:56 AM12/3/10
to Digg API
Oh, I shud have said that NewToDiggApi was me, forgot to change the
nick.

Will

unread,
Dec 3, 2010, 12:09:33 PM12/3/10
to Digg API
Welcome aboard, sir. :)
Reply all
Reply to author
Forward
0 new messages