Skip to content

Credits

Bases: TMDB

Credits functionality.

See: https://developers.themoviedb.org/3/credits

Source code in src/tmdb_client_py/people.py
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
class Credits(TMDB):
    """
    Credits functionality.

    See: https://developers.themoviedb.org/3/credits
    """

    BASE_PATH = "credit"
    URLS = {
        "info": "/{credit_id}",
    }

    def __init__(self, credit_id):
        super().__init__()
        self.credit_id = credit_id

    def info(self, **kwargs):
        """
        Get a movie or TV credit details by id.

        Args:
            None

        Returns:
            A dict representation of the JSON returned from the API.
        """
        path = self._get_credit_id_path("info")

        response = self._GET(path, kwargs)
        self._set_attrs_to_values(response)
        return response

    def _get_credit_id_path(self, key):
        return self._get_path(key).format(credit_id=self.credit_id)

info(**kwargs)

Get a movie or TV credit details by id.

Returns:

Type Description

A dict representation of the JSON returned from the API.

Source code in src/tmdb_client_py/people.py
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
def info(self, **kwargs):
    """
    Get a movie or TV credit details by id.

    Args:
        None

    Returns:
        A dict representation of the JSON returned from the API.
    """
    path = self._get_credit_id_path("info")

    response = self._GET(path, kwargs)
    self._set_attrs_to_values(response)
    return response