Skip to content

Commit

Permalink
feat(genre): add function to specify country when listing (#79)
Browse files Browse the repository at this point in the history
* fix(genre): list

* fix(genre): add the method to set a custom language

* styles: lint

* test: update

* styles: lint

* fix(genre): revert visibility of `GenreResult`
  • Loading branch information
agmbk committed Apr 2, 2024
1 parent d13dc07 commit ae5dc7f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/genre/list.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//! https://developer.themoviedb.org/reference/genre-movie-list
//! https://developer.themoviedb.org/reference/genre-tv-list

use std::borrow::Cow;

use crate::client::Executor;
Expand All @@ -13,6 +16,24 @@ pub(crate) struct GenreResult {
}

/// Command to list genres
///
/// ```rust
/// use tmdb_api::prelude::Command;
/// use tmdb_api::Client;
/// use tmdb_api::client::reqwest::ReqwestExecutor;
/// use tmdb_api::genre::list::GenreList;
///
/// #[tokio::main]
/// async fn main() {
/// let client = Client::<ReqwestExecutor>::new("this-is-my-secret-token".into());
/// let cmd = GenreList::tv();
/// let result = cmd.execute(&client).await;
/// match result {
/// Ok(res) => println!("found: {:#?}", res),
/// Err(err) => eprintln!("error: {:?}", err),
/// };
/// }
/// ```
#[derive(Clone, Debug, Default)]
pub struct GenreList {
path: &'static str,
Expand Down

0 comments on commit ae5dc7f

Please sign in to comment.