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
50
51
52
53
54
55
56
57
//! # Jplaceholder
//! [![Build Status](https://travis-ci.com/WebD-EG/Jplaceholder-Rust.svg?token=2xwgxyVwYTZY33ZwbM8M&branch=master)](https://travis-ci.com/WebD-EG/Jplaceholder-Rust)

//! A Rust library for the JSON Placeholder API
//! Documentation: [https://docs.rs/jplaceholder/1.0.1/jplaceholder/](https://docs.rs/jplaceholder/1.0.1/jplaceholder/)


//! # Table of Contents
//! - [JPlaceholder](#jplaceholder)
//!   - [Example](#example)
//!   - [Installation](#installation)
//!   - [Usage](#usage)
//!     - [The model trait](#the-model-trait)
//!     - [Relationships](#relationships)
//!   - [Contribution guide](#contribution-guide)

//! ## 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 = "1.0.1"
//! ```
//! 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;