Function omdb::query::imdb_id[][src]

pub fn imdb_id<S: Into<String>>(title: S) -> FindQuery
Expand description

Starts a new FindQuery with an imdb_id.

This can be built upon to add other constraints while finding a movie on OMDb. Use this method when you want to select a single movie by IMDb ID.

Examples

Find a movie using it’s IMDb id:

    let apikey = std::env::var("OMDB_APIKEY").expect("OMDB_APIKEY must be set");
    let movie = omdb::imdb_id("tt0032138")
        .apikey(apikey)
        .year(1939)
        .get()
        .await
        .unwrap();
    
    assert!(movie.title == "The Wizard of Oz");