1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
//! # Jplaceholder //! //! A Rust library for the JSON Placeholder API //! # Table of Contents //! 1. [Example](#example) //! 2. [Installation](#installation) //! ## Example: //! ```rust //! extern crate jplaceholder; //! use jplaceholder::Model; //! use jplaceholder::Post; //! match Post::find(2) { //! Some(post) => println!("Title of the article {}: {}", post.id, post.title), //! None => println!("Article not found!") //! } //! ``` //! ## Installation //! To install the library, you just have to put it into your **Cargo.toml** file: //! ```toml //! jplaceholder = "0.1.0" //! ``` //! Then, require the library into your main file. //! ```rust //! extern crate jplaceholder; //! ``` extern crate reqwest; extern crate serde_json; extern crate serde; #[macro_use] extern crate serde_derive; pub mod post; pub mod model; pub mod user; mod utils; pub use post::Post; pub use model::Model; pub use user::User;