Last active
December 20, 2018 01:48
-
-
Save rgchris/a97dc213f7e97d2ec8a45dd80295b60c to your computer and use it in GitHub Desktop.
Gravatar Lookup for Rebol and Red
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Rebol [ | |
| Title: "Get Gravatar" | |
| File: %gravatar.r | |
| Date: 27-Nov-2012 | |
| Purpose: "Generate Gravatar Profile Image URLs" | |
| ] | |
| gravatar: use [to-md5][ | |
| to-md5: func [val [any-string!]][ | |
| lowercase enbase/base checksum/method to binary! lowercase trim form val 'md5 16 | |
| ] | |
| func [ | |
| "Obtain the Gravatar Profile Image for the given Email Address" | |
| email [email!] "Email Address to Lookup" | |
| ][ | |
| rejoin [http://www.gravatar.com/avatar/ to-md5 email] | |
| ] | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Red [ | |
| Title: "Get Gravatar" | |
| File: %gravatar.red | |
| Date: 19-Dec-2018 | |
| Purpose: "Generate Gravatar Profile Image URLs" | |
| ] | |
| gravatar: func [ | |
| "Obtain the Gravatar Profile Image for the given Email Address" | |
| email [email!] "Email Address to Lookup" | |
| ][ | |
| rejoin [http://www.gravatar.com/avatar/ lowercase enbase/base checksum lowercase trim form email 'md5 16] | |
| ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment