Skip to content

Changes

Bases: TMDB

Changes functionality.

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

Source code in src/tmdb_client_py/changes.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
class Changes(TMDB):
    """
    Changes functionality.

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

    BASE_PATH = ""
    URLS = {
        "movie": "movie/changes",
        "tv": "tv/changes",
        "person": "person/changes",
    }

    def movie(self, **kwargs):
        """
        Get a list of all of the movie ids that have been changed
        in the past 24 hours.

        You can query it for up to 14 days worth of changed IDs at
        a time with the start_date and end_date query parameters.
        100 items are returned per page.

        Args:
            start_date: (optional) Expected format is 'YYYY-MM-DD'.
            end_date: (optional) Expected format is 'YYYY-MM-DD'.
            page: (optional) Minimum 1, maximum 1000, default 1.

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

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

    def tv(self, **kwargs):
        """
        Get a list of all of the TV show ids that have been changed
        in the past 24 hours.

        You can query it for up to 14 days worth of changed IDs at
        a time with the start_date and end_date query parameters.
        100 items are returned per page.

        Args:
            start_date: (optional) Expected format is 'YYYY-MM-DD'.
            end_date: (optional) Expected format is 'YYYY-MM-DD'.
            page: (optional) Minimum 1, maximum 1000, default 1.

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

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

    def person(self, **kwargs):
        """
        Get a list of all of the person ids that have been changed
        in the past 24 hours.

        You can query it for up to 14 days worth of changed IDs at
        a time with the start_date and end_date query parameters.
        100 items are returned per page.

        Args:
            start_date: (optional) Expected format is 'YYYY-MM-DD'.
            end_date: (optional) Expected format is 'YYYY-MM-DD'.
            page: (optional) Minimum 1, maximum 1000, default 1.

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

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

movie(**kwargs)

Get a list of all of the movie ids that have been changed in the past 24 hours.

You can query it for up to 14 days worth of changed IDs at a time with the start_date and end_date query parameters. 100 items are returned per page.

Parameters:

Name Type Description Default
start_date

(optional) Expected format is 'YYYY-MM-DD'.

required
end_date

(optional) Expected format is 'YYYY-MM-DD'.

required
page

(optional) Minimum 1, maximum 1000, default 1.

required

Returns:

Type Description

A dict representation of the JSON returned from the API.

Source code in src/tmdb_client_py/changes.py
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
def movie(self, **kwargs):
    """
    Get a list of all of the movie ids that have been changed
    in the past 24 hours.

    You can query it for up to 14 days worth of changed IDs at
    a time with the start_date and end_date query parameters.
    100 items are returned per page.

    Args:
        start_date: (optional) Expected format is 'YYYY-MM-DD'.
        end_date: (optional) Expected format is 'YYYY-MM-DD'.
        page: (optional) Minimum 1, maximum 1000, default 1.

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

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

person(**kwargs)

Get a list of all of the person ids that have been changed in the past 24 hours.

You can query it for up to 14 days worth of changed IDs at a time with the start_date and end_date query parameters. 100 items are returned per page.

Parameters:

Name Type Description Default
start_date

(optional) Expected format is 'YYYY-MM-DD'.

required
end_date

(optional) Expected format is 'YYYY-MM-DD'.

required
page

(optional) Minimum 1, maximum 1000, default 1.

required

Returns:

Type Description

A dict representation of the JSON returned from the API.

Source code in src/tmdb_client_py/changes.py
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
def person(self, **kwargs):
    """
    Get a list of all of the person ids that have been changed
    in the past 24 hours.

    You can query it for up to 14 days worth of changed IDs at
    a time with the start_date and end_date query parameters.
    100 items are returned per page.

    Args:
        start_date: (optional) Expected format is 'YYYY-MM-DD'.
        end_date: (optional) Expected format is 'YYYY-MM-DD'.
        page: (optional) Minimum 1, maximum 1000, default 1.

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

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

tv(**kwargs)

Get a list of all of the TV show ids that have been changed in the past 24 hours.

You can query it for up to 14 days worth of changed IDs at a time with the start_date and end_date query parameters. 100 items are returned per page.

Parameters:

Name Type Description Default
start_date

(optional) Expected format is 'YYYY-MM-DD'.

required
end_date

(optional) Expected format is 'YYYY-MM-DD'.

required
page

(optional) Minimum 1, maximum 1000, default 1.

required

Returns:

Type Description

A dict representation of the JSON returned from the API.

Source code in src/tmdb_client_py/changes.py
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
def tv(self, **kwargs):
    """
    Get a list of all of the TV show ids that have been changed
    in the past 24 hours.

    You can query it for up to 14 days worth of changed IDs at
    a time with the start_date and end_date query parameters.
    100 items are returned per page.

    Args:
        start_date: (optional) Expected format is 'YYYY-MM-DD'.
        end_date: (optional) Expected format is 'YYYY-MM-DD'.
        page: (optional) Minimum 1, maximum 1000, default 1.

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

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