2008/7/12 Brad Fitzpatrick <brad...@google.com>:
Are these links meant to be bi-directional?
The following 2 urls give different results implying that the SGApi
can only follow links between accounts and doesn't infer
relationships:
#pseudo-python
userUrlsSet = set(["somebaseurl"])
urlsToVisitSet = set(["somebaseurl"])
visitedUrlsSet = ()
while len(urlsToVisitSet) > 0:
for url in urlsToVisitSet.copy():
#network call to sgapi
fetchedUrlsSet = fetchOtherUrls(url)
visitedUrlsSet.add(url)
for fetchedUrl in fetchedUrlsSet:
if fetchedUrl not in visitedUrlsSet:
urlsToVisitSet.add(fetchedUrl)
userUrlsSet = userUrlsSet.union(fetchedUrlsSet)
Note that this is approximately O(N**2) and that it hammers Google servers.
However it has the benefit that if a user enters just one url we can
find all the other urls. It would be _very_ useful if the SGApi could
do this and expose it as one call.
2008/7/14 Brad Fitzpatrick <brad...@google.com>:
At the moment any tool based on the idea that the user enters some of
their urls and the system works out their urls will still have to
implement something like the following algorithm:
The original service accepts multiple URLs and has the fme (follow "me"
links) argument. I'm still unclear as to how this "otherme" query
differs from "lookup".
-Dale