fix: update docs

This commit is contained in:
Sam Denty 2023-01-03 14:24:47 +00:00
parent 32e45ca7bb
commit ad327ae85a
No known key found for this signature in database
GPG key ID: 7B4EAF7B9E291B79
4 changed files with 8 additions and 14 deletions

2
Cargo.lock generated
View file

@ -1786,7 +1786,7 @@ checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"
[[package]] [[package]]
name = "site_icons" name = "site_icons"
version = "0.6.0" version = "0.6.1"
dependencies = [ dependencies = [
"byteorder", "byteorder",
"cached", "cached",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "site_icons" name = "site_icons"
version = "0.6.0" version = "0.6.1"
authors = ["Sam Denty <sam@samdenty.com>"] authors = ["Sam Denty <sam@samdenty.com>"]
edition = "2018" edition = "2018"
license = "GPL-3.0" license = "GPL-3.0"

View file

@ -29,14 +29,11 @@ site-icons https://github.com
### Rust usage ### Rust usage
```rust ```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 // scrape the icons from a url
icons.load_website("https://github.com").await?; let entries = icons.load_website("https://github.com", false).await?;
// fetch all icons, ensuring they exist & determining size
let entries = icons.entries().await;
// entries are sorted from highest to lowest resolution // entries are sorted from highest to lowest resolution
for icon in entries { for icon in entries {

View file

@ -5,15 +5,12 @@
//! //!
//! ## Usage //! ## Usage
//! ```rust //! ```rust
//! use site_icons::Icons; //! use site_icons::SiteIcons;
//! //!
//! async fn run() { //! async fn run() {
//! let mut icons = Icons::new(); //! let mut icons = SiteIcons::new();
//! // scrape the icons from a url //! // scrape the icons from a url
//! icons.load_website("https://github.com").await.unwrap(); //! let entries = icons.load_website("https://github.com", false).await.unwrap();
//!
//! // fetch all icons, ensuring they exist & determining size
//! let entries = icons.entries().await;
//! //!
//! // entries are sorted from highest to lowest resolution //! // entries are sorted from highest to lowest resolution
//! for icon in entries { //! for icon in entries {