Skip to content

dshomoye/rick-and-morty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rick And Morty Rust Helper

This is a rust crate for working with the rick and morty api here. Primarily a learning (rust) experience for me. Contributions welcome! Install crate

Documentation on docs.rs


Usage

  • Get a single character by id:
 use rick_and_morty as rm;

 async fn get_character() -> () {
   let c = rm::character::get(1).await;
   match c {
       Ok(res) => println!("{:?}", res),
       Err(e) => println!("{:?}", e),
    }
}
  • Get all characters
 use rick_and_morty as rm;

 async fn get_characters() -> () {
   let c = rm::character::get_all().await;
   match c {
       Ok(res) => println!("{:?}", res),
       Err(e) => println!("{:?}", e),
    }
}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

A rust wrapper for rickandmortyapi.com (why not?)

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages