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

Skip to content

tobiasge/tmdb-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust client for The Movie DB API

This is yet another client for TMDB but it supports async functions.

Installing

cargo add tmdb-api

Usage

use tmdb_api::tvshow::search::TVShowSearch;
use tmdb_api::prelude::Command;
use tmdb_api::Client;

#[tokio::main]
async fn main() {
    let secret = std::env::var("TMDB_TOKEN_V3").unwrap();
    let client = Client::new(secret);
    let cmd = TVShowSearch::new("simpsons".into());

    let result = cmd.execute(&client).await.unwrap();
    let item = result.results.first().unwrap();
    println!("TVShow found: {}", item.inner.name);
}

Running the tests

cargo test

If you want to run some integration tests, just export a TMDB_TOKEN_V3 environemnt variable and run

cargo test --features integration

About

Yet another TMDB api client written in rust, working with async

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 99.0%
  • Shell 1.0%