Documentation

OMDb API for Rust

Build Status

Documentation

Examples

Find movie by title:

let show = omdb::title("The Wizard of Oz")
	.year(1939)
	.get().unwrap();

assert!(show.imdb_id == "tt0032138");

Find movie by IMDb ID:

let movie = omdb::imdb_id("tt0111161")
    .get().unwrap();

assert!(movie.title == "The Shawshank Redemption");

Search movies:

use omdb::Kind;

let movies = omdb::search("batman")
	.kind(Kind::Movie) // Optionalally search only for movies
	.get().unwrap();

assert!(movies.total_results > 0);