gravatar: wrapper for Gravatar.com service.

clean-macosx-x86-32
John Benediktsson 2019-03-28 13:49:58 -07:00
parent 6f58118afb
commit 88abc4e4c2
3 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1 @@
John Benediktsson

View File

@ -0,0 +1,18 @@
! Copyright (C) 2011 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
USING: accessors assocs classes.tuple formatting http.client
images.http json.reader kernel sequences strings ;
IN: gravatar
TUPLE: info aboutMe accounts currentLocation displayName emails
hash id ims name phoneNumbers photos preferredUsername
profileBackground profileUrl requestHash thumbnailUrl urls ;
: gravatar-info ( gravatar-id -- info )
"http://gravatar.com/%s.json" sprintf http-get nip
>string json> "entry" of first info from-slots ;
: gravatar. ( gravatar-id -- )
gravatar-info thumbnailUrl>> http-image. ;

View File

@ -0,0 +1 @@
Wrapper for the Gravatar service.