From ad327ae85a395d9c2fa14e3fff048317fc6b895d Mon Sep 17 00:00:00 2001 From: Sam Denty Date: Tue, 3 Jan 2023 14:24:47 +0000 Subject: [PATCH] fix: update docs --- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 9 +++------ src/lib.rs | 9 +++------ 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ddb16f0..ea078d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1786,7 +1786,7 @@ checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" [[package]] name = "site_icons" -version = "0.6.0" +version = "0.6.1" dependencies = [ "byteorder", "cached", diff --git a/Cargo.toml b/Cargo.toml index a0ff3b9..f586428 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "site_icons" -version = "0.6.0" +version = "0.6.1" authors = ["Sam Denty "] edition = "2018" license = "GPL-3.0" diff --git a/README.md b/README.md index 0f38ac3..40b538d 100644 --- a/README.md +++ b/README.md @@ -29,14 +29,11 @@ site-icons https://github.com ### Rust usage ```rust -use site_icons::Icons; +use site_icons::SiteIcons; -let mut icons = Icons::new(); +let mut icons = SiteIcons::new(); // scrape the icons from a url -icons.load_website("https://github.com").await?; - -// fetch all icons, ensuring they exist & determining size -let entries = icons.entries().await; +let entries = icons.load_website("https://github.com", false).await?; // entries are sorted from highest to lowest resolution for icon in entries { diff --git a/src/lib.rs b/src/lib.rs index bea4416..eb6cc61 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,15 +5,12 @@ //! //! ## Usage //! ```rust -//! use site_icons::Icons; +//! use site_icons::SiteIcons; //! //! async fn run() { -//! let mut icons = Icons::new(); +//! let mut icons = SiteIcons::new(); //! // scrape the icons from a url -//! icons.load_website("https://github.com").await.unwrap(); -//! -//! // fetch all icons, ensuring they exist & determining size -//! let entries = icons.entries().await; +//! let entries = icons.load_website("https://github.com", false).await.unwrap(); //! //! // entries are sorted from highest to lowest resolution //! for icon in entries {