diff --git a/Cargo.toml b/Cargo.toml index e8409d7..2f75d25 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,10 @@ name = "xkcd-search" version = "0.1.0" authors = ["trivernis "] edition = "2018" +readme = "README.md" +repository = "https://github.com/Trivernis/xkcd-search-rs" +description = "Search for xkcd comics and retrieve metadata" +license = "Apache-2.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/README.md b/README.md new file mode 100644 index 0000000..f10f07e --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# XKCD Search + +This crate provides functions to search for xkcd comics by title. + +## Usage + +```rust +use xkcd_search; + +#[tokio::main] +async fn main() { + let phone_entries = xkcd_search::search("Phone").await.unwrap(); + let mut comics = Vec::new(); + + for (_title, id) in phone_entries { + comics.push(xkcd_search::get_comic(id).await.unwrap()) + } +} +``` + +## License + +Apache-2.0 \ No newline at end of file