TheMovieDB 0.1.0

A robust and idiomatic Rust API wrapper for The Movie Database (TMDb) v3 API.
Documentation
# Account Module

The `account` module provides functionalities to interact with user accounts on TMDb, including managing lists, favorite movies/TV shows, and rated content.

## Structs

### `Account`

Represents a user's TMDb account. It allows fetching account details, lists, favorite items, rated items, and managing watchlists.

#### Methods

- `new(session_id: String) -> Self`: Creates a new `Account` instance with the given session ID.
- `info(options: Option<HashMap<String, String>>) -> Result<Value, Box<dyn std::error::Error>>`: Retrieves account details.
- `lists(options: Option<HashMap<String, String>>) -> Result<Value, Box<dyn std::error::Error>>`: Retrieves lists created by the account.
- `favorite_movies(options: Option<HashMap<String, String>>) -> Result<Value, Box<dyn std::error::Error>>`: Retrieves favorite movies of the account.
- `favorite_tv(options: Option<HashMap<String, String>>) -> Result<Value, Box<dyn std::error::Error>>`: Retrieves favorite TV shows of the account.
- `favorite(options: Option<HashMap<String, String>>, payload: Option<Value>) -> Result<Value, Box<dyn std::error::Error>>`: Adds or removes a movie/TV show from favorites.
- `rated_movies(options: Option<HashMap<String, String>>) -> Result<Value, Box<dyn std::error::Error>>`: Retrieves rated movies by the account.
- `rated_tv(options: Option<HashMap<String, String>>) -> Result<Value, Box<dyn std::error::Error>>`: Retrieves rated TV shows by the account.
- `rated_tv_episodes(options: Option<HashMap<String, String>>) -> Result<Value, Box<dyn std::error::Error>>`: Retrieves rated TV episodes by the account.
- `watchlist_movies(options: Option<HashMap<String, String>>) -> Result<Value, Box<dyn std::error::Error>>`: Retrieves movies in the account's watchlist.
- `watchlist_tv(options: Option<HashMap<String, String>>) -> Result<Value, Box<dyn std::error::Error>>`: Retrieves TV shows in the account's watchlist.
- `watchlist(options: Option<HashMap<String, String>>, payload: Option<Value>) -> Result<Value, Box<dyn std::error::Error>>`: Adds or removes a movie/TV show from the watchlist.

### `Authentication`

Provides methods for TMDb authentication, including guest sessions and user session management.

#### Methods

- `new() -> Self`: Creates a new `Authentication` instance.
- `guest_session_new() -> Result<Value, Box<dyn std::error::Error>>`: Creates a new guest session.
- `token_new() -> Result<Value, Box<dyn std::error::Error>>`: Creates a new request token.
- `session_new() -> Result<Value, Box<dyn std::error::Error>>`: Creates a new user session.
- `token_validate_with_login() -> Result<Value, Box<dyn std::error::Error>>`: Validates a request token with a username and password.
- `session_delete(options: Option<HashMap<String, String>>, payload: Option<Value>) -> Result<Value, Box<dyn std::error::Error>>`: Deletes a session.

### `GuestSessions`

Manages operations related to guest sessions, such as retrieving rated content.

#### Methods

- `new(guest_session_id: String) -> Self`: Creates a new `GuestSessions` instance with the given guest session ID.
- `rated_movies(options: Option<HashMap<String, String>>) -> Result<Value, Box<dyn std::error::Error>>`: Retrieves movies rated by the guest session.
- `rated_tv(options: Option<HashMap<String, String>>) -> Result<Value, Box<dyn std::error::Error>>`: Retrieves TV shows rated by the guest session.
- `rated_tv_episodes(options: Option<HashMap<String, String>>) -> Result<Value, Box<dyn std::error::Error>>`: Retrieves TV episodes rated by the guest session.

### `Lists`

Manages TMDb lists, including creating, adding/removing items, clearing, and deleting lists.

#### Methods

- `new(id: i32, session_id: String) -> Self`: Creates a new `Lists` instance with the given list ID and session ID.
- `info(options: Option<HashMap<String, String>>) -> Result<Value, Box<dyn std::error::Error>>`: Retrieves list details.
- `item_status(options: Option<HashMap<String, String>>) -> Result<Value, Box<dyn std::error::Error>>`: Checks the status of an item in a list.
- `list_create(options: Option<HashMap<String, String>>, payload: Option<Value>) -> Result<Value, Box<dyn std::error::Error>>`: Creates a new list.
- `add_item(options: Option<HashMap<String, String>>, payload: Option<Value>) -> Result<Value, Box<dyn std::error::Error>>`: Adds an item to a list.
- `remove_item(options: Option<HashMap<String, String>>, payload: Option<Value>) -> Result<Value, Box<dyn std::error::Error>>`: Removes an item from a list.
- `list_clear(options: Option<HashMap<String, String>>) -> Result<Value, Box<dyn std::error::Error>>`: Clears all items from a list.
- `list_delete(options: Option<HashMap<String, String>>) -> Result<Value, Box<dyn std::error::Error>>`: Deletes a list.