Net::OpenID::UserProfile
Martin Atkins
mart at degeneration.co.uk
Wed May 25 09:29:50 PDT 2005
Brad Fitzpatrick wrote:
> Somebody want to write that?
>
Despite saying I wasn't going to work on this (heh) I've made a start on
a collection modules which will, given a data URL, return a hashref of
defined keys mapped to values obtained from the document. There's a
different module for Atom, RSS, FOAF and vCard.
This is just the backend stuff. There should be a frontend on top of all
this which allows the caller to say "Find out everything you can about
the owner of this URL". It should also hide the hashref behind some
accessor methods to allow magic to happen, such as generating a SHA1
hash of the email address if one is requested but wasn't available.
(assuming the cleartext email address is, of course.)
So far I've got the start of both the RSS and Atom modules. RSS only
returns weblog_name and weblog_url, while the Atom one is a bit more
fancy and can pick out (as of right now) the following:
* weblog_url: obtained by looking for a link with
rel="alternate" and type="text/html".
* weblog_name: obtained either from the link's "title" attribute or from
the title of the Atom document itself.
* name: From the name element inside "author", if present.
* website_url: From the uri element inside "author"
* email: From the email element inside "author"
Of course, FOAF will allow all sorts of different things to be returned.
LiveJournal's FOAF data isn't very interesting, but it contains a
weblog URL, an email address SHA1 and a "nickname" (though the latter is
just the user's username.)
I'm not sure what other stuff you can include in FOAF that might be
useful. depictions and images, perhaps? It might also be nice to be able
to include a "personal profile document" of some description which
LiveJournal could then link to where it would normally link to its own
userinfo.bml page. (assuming such a URL is available for a given poster,
of course.)
I've yet to look at vCard, but I assume it at least has name, email and
website_url.
More information about the yadis
mailing list