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]]
|
[[package]]
|
||||||
name = "site_icons"
|
name = "site_icons"
|
||||||
version = "0.6.0"
|
version = "0.6.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder",
|
"byteorder",
|
||||||
"cached",
|
"cached",
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Reference in a new issue