Source code for api.trending_api

"""
Trending API client for The Movie Database (TMDB) endpoints.

This module provides a high-level interface for interacting with trending-related
TMDB API endpoints. It extends BaseAPI to inherit authentication, request
handling, and response parsing functionality.

Usage:
    api = TrendingAPI()
    response = api.get_trending_movies('day')
    logger.info(response.data['total_results'])
"""

from loguru import logger
from api.base_api import BaseAPI

[docs] class TrendingAPI(BaseAPI): """ Client for TMDB Trending API endpoints. Provides methods for retrieving the movies trending over a given time window. All methods return a response object containing status code, headers, and parsed data. Attributes: _sub_path (str): Base path segment for trending endpoints. Example: api = TrendingAPI() trending = api.get_trending_movies('week') """ _sub_path = "trending"