Thanks to visit codestin.com
Credit goes to github.com

Skip to content

sbercx/omdb-rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OMDb API for Rust

Build Status crates.io docs.rs

Search movies, tv shows, and games using The Open Movie Database.

Examples

Find by title:

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

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

Find 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) // Optionally filter results to movies only
	.get().unwrap();

assert!(movies.total_results > 0);

Usage

Add the crates.io omdb dependency to your Cargo.toml file.

[dependencies]
omdb = "*"

Include extern crate: omdb; in your crate root.

About

OMDb API for Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%