TheMovieDB 0.1.0

A robust and idiomatic Rust API wrapper for The Movie Database (TMDb) v3 API.
Documentation
mod utils;
use TheMovieDB::find::{Find, Trending};
use std::collections::HashMap;

#[tokio::test]
async fn test_find_info() {
    unsafe { std::env::set_var("TMDB_API_KEY", "dummy_api_key"); }
    let find = Find::new("tt0120737".to_string());
    let mut options = HashMap::new();
    options.insert("external_source".to_string(), "imdb_id".to_string());
    let result = find.info(Some(options)).await;
    assert!(result.is_err());
    unsafe { std::env::remove_var("TMDB_API_KEY"); }
}

#[tokio::test]
async fn test_trending_info() {
    unsafe { std::env::set_var("TMDB_API_KEY", "dummy_api_key"); }
    let trending = Trending::new(Some("all".to_string()), Some("week".to_string()));
    let result = trending.info(None).await;
    assert!(result.is_err());
    unsafe { std::env::remove_var("TMDB_API_KEY"); }
}