Crate gravatar_rs

source ·
Expand description

gravatar-rs

This crate provides an API for creating Gravatar image URLs, and by extension, Ivatar/Libravatar image URLs.

The default Generator::base_url is www.gravatar.com, if you want to set a custom base_url use Generator::set_base_url.

use gravatar_rs::Generator;

let generator = Generator::default();

let gravatar_url = generator.generate("helllo@holllo.org");

assert_eq!(
  gravatar_url,
  "https://www.gravatar.com/avatar/e9a2c03d607ec80a5b725ad42c19ee36"
);

For all possible options see Generator.

Structs

  • A generator for Gravatar image URLs.