fix: update docs
This commit is contained in:
parent
32e45ca7bb
commit
ad327ae85a
4 changed files with 8 additions and 14 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -1786,7 +1786,7 @@ checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"
|
|||
|
||||
[[package]]
|
||||
name = "site_icons"
|
||||
version = "0.6.0"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"cached",
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Reference in a new issue