Skip to content
Permalink
Browse files

gravatar: wrapper for Gravatar.com service.

  • Loading branch information...
mrjbq7 committed Mar 28, 2019
1 parent 6f58118 commit 88abc4e4c24a309f0ab5e8122a9c5c5168f4d383
Showing with 20 additions and 0 deletions.
  1. +1 −0 extra/gravatar/authors.txt
  2. +18 −0 extra/gravatar/gravatar.factor
  3. +1 −0 extra/gravatar/summary.txt
@@ -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.

0 comments on commit 88abc4e

Please sign in to comment.
You can’t perform that action at this time.