Hi, The "Gravatar" project is a simple wrapper for the Gravatar API allowing you to get small avatar images for a given registered email address. You can easily access and use it in Pharo. The project is located on STHub at http://smalltalkhub.com/#!/~TorstenBergmann/Gravatar To install just open the Pharo configuration browser and load "Gravatar" from there. You can also install manually, read the docu on the project page. Some examples: Gravatar imageURLFor: 'example@mail.com' If you require a different size just evaluate: Gravatar imageURLFor: 'example@mail.com' size: 32. If you need the real image you can use Pharos Zinc components suite to get the image form over HTTP and open it on your Pharo desk: |form| form := ZnEasy getJpeg: (self imageURLFor: 'example@mail.com'). form asMorph openInWorld In the end it is just a simple class - but I think it may be useful for others too. Thx T.
There is already code for that in the image: (PharoUser new retrieveGravatarFromMail: 'sven@stfx.eu') openInWindow. PharoUser is an odd class (this code should be on the class side). Maybe both approaches can be combined ? On 23 Apr 2014, at 13:44, Torsten Bergmann <astares@gmx.de> wrote:
Hi,
The "Gravatar" project is a simple wrapper for the Gravatar API allowing you to get small avatar images for a given registered email address. You can easily access and use it in Pharo.
The project is located on STHub at http://smalltalkhub.com/#!/~TorstenBergmann/Gravatar
To install just open the Pharo configuration browser and load "Gravatar" from there. You can also install manually, read the docu on the project page.
Some examples:
Gravatar imageURLFor: 'example@mail.com'
If you require a different size just evaluate:
Gravatar imageURLFor: 'example@mail.com' size: 32.
If you need the real image you can use Pharos Zinc components suite to get the image form over HTTP and open it on your Pharo desk:
|form| form := ZnEasy getJpeg: (self imageURLFor: 'example@mail.com'). form asMorph openInWorld
In the end it is just a simple class - but I think it may be useful for others too.
Thx T.
participants (2)
-
Sven Van Caekenberghe -
Torsten Bergmann