gravatar: wrapper for Gravatar.com service.
parent
6f58118afb
commit
88abc4e4c2
|
@ -0,0 +1 @@
|
||||||
|
John Benediktsson
|
|
@ -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. ;
|
|
@ -0,0 +1 @@
|
||||||
|
Wrapper for the Gravatar service.
|
Loading…
Reference in New Issue