Function omdb::query::title[][src]

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

Starts a new FindQuery with a title.

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 title.

Examples

Find a series using it’s title:

    use omdb::Kind;
    let apikey = std::env::var("OMDB_APIKEY").expect("OMDB_APIKEY must be set");
    
    let show = omdb::title("Silicon Valley")
        .apikey(apikey)
        .year(2014)
        .kind(Kind::Series)
        .get()
        .await
        .unwrap();
    
    assert!(show.imdb_id == "tt2575988");