Crate jplaceholder[][src]

Jplaceholder

A Rust library for the JSON Placeholder API

Table of Contents

  1. Example
  2. Installation

Example:

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:

jplaceholder = "0.1.0"

Then, require the library into your main file.

extern crate jplaceholder;

Re-exports

pub use post::Post;
pub use model::Model;
pub use user::User;

Modules

model
post
user