rusty_xkcd

Crates.iorusty_xkcd
lib.rsrusty_xkcd
version0.1.2
sourcesrc
created_at2019-03-10 04:45:46.64967
updated_at2019-03-13 21:53:28.774914
descriptionAn API wrapper for xkcd.com
homepage
repositoryhttps://github.com/Kixiron/rusty_xkcd
max_upload_size
id119742
size19,109
Chase Wilson (Kixiron)

documentation

https://docs.rs/rusty_xkcd

README

Rusty Xkcd

Crates.io Docs.rs GitLab Travis CI GitLab CI License Language PRs Welcome

Rusty Xkcd is an API wrapper for the Xkcd API. It aims to give full access to the Xkcd API with maximum performance, control, and reliability.

Xkcd Comics

Using rusty_xkcd to interact with the xkcd api is easy!

To start, add this line to your Cargo.toml

[dependencies]
rusty_xkcd = "0.1.2"

Then import the crate to wherever you want to use it

extern crate rusty_xkcd;
use rusty_xkcd::Comic;

Now you're ready to start using the Comic API!
To get the latest xkcd comic, use get_latest_comic()

let comic = Comic::get_latest_comic().unwrap();

To get a comic by number, use get_comic()

let comic = Comic::get_comic(100).unwrap();

And finally, to get a random xkcd comic, use get_random_comic()

let comic = Comic::get_random_comic().unwrap();

Coming Soon

Explain Xkcd
What If

Commit count: 92

cargo fmt