Skip to content

Latest commit

 

History

History
95 lines (74 loc) · 2.35 KB

README.md

File metadata and controls

95 lines (74 loc) · 2.35 KB

thetvdb

crates.io Released API docs Minimum rustc version CI

TheTVDB API v3 Rust async client.

Minimum Rust version: 1.40.0

In order to use this client you will need an API key. To create a new API key log in and go to the API Keys page.

NOTE: Because it depends on reqwest, thetvdb currently only works with tokio.

Install

Add with cargo edit:

cargo add thetvdb

or add to Cargo.toml:

[dependencies]
thetvdb = "0.1.0-beta.2"

Use

Search series by title:

use thetvdb::{Client, params::SearchBy};

let client = Client::new("YOUR_API_KEY").await?;
let search_results = client.search(SearchBy::Name("Planet Earth")).await?;

For more examples check the documentation.

Supported requests:

Authentication

  • POST /login (used internally; cannot be manually requested)

Episodes

  • GET /episodes/{id}

Languages

  • GET /languages
  • GET /languages/{id}

Movies

  • GET /movies/{id}
  • GET /movieupdates

Search

  • GET /search/series

Series

  • GET /series/{id}
  • HEAD /series/{id}
  • GET /series/{id}/actors
  • GET /series/{id}/episodes
  • GET /series/{id}/episodes/query
  • GET /series/{id}/episodes/summary
  • GET /series/{id}/filter
  • GET /series/{id}/images
  • GET /series/{id}/images/query
  • GET /series/{id}/images/query/params

Updates

  • GET /updated/query

Integration tests

export THETVDB_APIKEY=<API_KEY>
cargo t --test client

License

Licensed under either of Apache License, Version 2.0 or MIT at your option.