#image-url #avatar #image #profile #wordpress

gravatar

A small library that generates Gravatar image URLs

7 releases

Uses old Rust 2015

0.2.0 Nov 10, 2018
0.1.5 May 14, 2016
0.1.4 Mar 3, 2016
0.1.3 Apr 4, 2015
0.1.2 Mar 27, 2015

#7 in #wordpress

Download history 46/week @ 2023-12-04 53/week @ 2023-12-11 41/week @ 2023-12-18 12/week @ 2023-12-25 31/week @ 2024-01-01 51/week @ 2024-01-08 21/week @ 2024-01-15 32/week @ 2024-01-29 10/week @ 2024-02-05 7/week @ 2024-02-12 31/week @ 2024-02-19 43/week @ 2024-02-26 38/week @ 2024-03-04 50/week @ 2024-03-11 27/week @ 2024-03-18

165 downloads per month
Used in 3 crates (via land-restful)

BSD-3-Clause

10KB
114 lines

rust-gravatar

Build Status Cargo version Libraries.io for GitHub License

Documentation

rust-gravatar is a small Rust library that generates Gravatar image URLs based on the official Gravatar specification.

Example

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"
);

Dependencies

~2.5MB
~74K SLoC