/GravatarDemo-Newspeak

Newspeak implementation to interact with the Gravatar API. Useful example for new users

MIT LicenseMIT

My Gravatar demo projects are for developers to get acquainted with languages and platforms with something more than a "Hello World" example. Versions are available for Clojure, F#, Newspeak, Pharo, Racket, and Squeak.


GravatarDemo-Newspeak

Newspeak implementation to interact with the Gravatar API.

TODO

  • Support the latest Newspeak release.

Installation

  1. Download this project.
  2. Install and run Newspeak.
  3. In the Newspeak Browser, select Repositories. Add a new repository with the local repository path (this project's location).
  4. Select the repository then select revert in the Image column.
  5. After syncing, the Gravatar namespace will be accessible.

Example Usage

Evaluate in a Workspace:

(* Retrieve the image for the email address *)
| gravatar |
gravatar:: Gravatar usingPlatform: platform.
gravatar retrieveProfileForEmail: 'email@example.com'.
(* Retrieve the image (200 px by 200 px, rated 'G' or 'PG') for the email address *)
| gravatar |
gravatar:: Gravatar usingPlatform: platform.
gravatar retrieveImageForEmail: 'email@example.com' size: 200 rating: 'pg'.
(* Retrieve the profile for the email address *)
| gravatar |
gravatar:: Gravatar usingPlatform: platform.
gravatar retrieveImageForEmail: 'email@example.com'.

Author

Bracken Spencer

License

GravatarDemo-Newspeak is released under the MIT license. See the LICENSE file for more info.


Useful Links