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]]
name = "site_icons"
version = "0.6.0"
version = "0.6.1"
dependencies = [
"byteorder",
"cached",

View file

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

View file

@ -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 {

View file

@ -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 {