Crates.io | gravatar |
lib.rs | gravatar |
version | 0.2.0 |
source | src |
created_at | 2015-03-20 20:18:20.615712 |
updated_at | 2018-11-10 19:46:25.879277 |
description | A small library that generates Gravatar image URLs. |
homepage | https://github.com/chowdhurya/rust-gravatar/ |
repository | https://github.com/chowdhurya/rust-gravatar/ |
max_upload_size | |
id | 1625 |
size | 16,020 |
rust-gravatar
is a small Rust library that generates Gravatar image URLs based
on the
official Gravatar specification.
extern crate gravatar;
use gravatar::{Gravatar, Rating};
let url = Gravatar::new("email@example.com")
.set_size(Some(150))
.set_rating(Some(Rating::Pg))
.image_url();
assert_eq!(
url.as_str(),
"https://secure.gravatar.com/avatar/5658ffccee7f0ebfda2b226238b1eb6e?s=150&r=pg"
);