Skip to content

Companies

Bases: TMDB

Companies functionality.

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

Source code in src/tmdb_client_py/movies.py
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
class Companies(TMDB):
    """
    Companies functionality.

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

    BASE_PATH = "company"
    URLS = {
        "info": "/{id}",
        "alternative_names": "/{id}/alternative_names",
        "images": "/{id}/images",
        "movies": "/{id}/movies",  # backward compatibility
    }

    def __init__(self, id=0):
        super().__init__()
        self.id = id

    def info(self, **kwargs):
        """
        Get a companies details by id.

        Args:

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

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

    def alternative_names(self, **kwargs):
        """
        Get the alternative names of a company.

        Args:

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

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

    def images(self, **kwargs):
        """
        Get a company's logos by id.

        There are two image formats that are supported for companies, PNG's and
        SVG's. You can see which type the original file is by looking at the
        file_type field. We prefer SVG's as they are resolution independent and
        as such, the width and height are only there to reflect the original
        asset that was uploaded.  An SVG can be scaled properly beyond those
        dimensions if you call them as a PNG.

        For more information about how SVG's and PNG's can be used, take a read
        through https://developers.themoviedb.org/3/getting-started/images.

        Args:

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

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

    # backward compatibility
    def movies(self, **kwargs):
        """
        Get the list of movies associated with a particular company.

        Args:
            language: (optional) ISO 639-1 code.
            page: (optional) Minimum value of 1.  Expected value is an integer.

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

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

alternative_names(**kwargs)

Get the alternative names of a company.

Args:

Returns:

Type Description

A dict representation of the JSON returned from the API.

Source code in src/tmdb_client_py/movies.py
633
634
635
636
637
638
639
640
641
642
643
644
645
646
def alternative_names(self, **kwargs):
    """
    Get the alternative names of a company.

    Args:

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

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

images(**kwargs)

Get a company's logos by id.

There are two image formats that are supported for companies, PNG's and SVG's. You can see which type the original file is by looking at the file_type field. We prefer SVG's as they are resolution independent and as such, the width and height are only there to reflect the original asset that was uploaded. An SVG can be scaled properly beyond those dimensions if you call them as a PNG.

For more information about how SVG's and PNG's can be used, take a read through https://developers.themoviedb.org/3/getting-started/images.

Args:

Returns:

Type Description

A dict representation of the JSON returned from the API.

Source code in src/tmdb_client_py/movies.py
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
def images(self, **kwargs):
    """
    Get a company's logos by id.

    There are two image formats that are supported for companies, PNG's and
    SVG's. You can see which type the original file is by looking at the
    file_type field. We prefer SVG's as they are resolution independent and
    as such, the width and height are only there to reflect the original
    asset that was uploaded.  An SVG can be scaled properly beyond those
    dimensions if you call them as a PNG.

    For more information about how SVG's and PNG's can be used, take a read
    through https://developers.themoviedb.org/3/getting-started/images.

    Args:

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

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

info(**kwargs)

Get a companies details by id.

Args:

Returns:

Type Description

A dict representation of the JSON returned from the API.

Source code in src/tmdb_client_py/movies.py
618
619
620
621
622
623
624
625
626
627
628
629
630
631
def info(self, **kwargs):
    """
    Get a companies details by id.

    Args:

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

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

movies(**kwargs)

Get the list of movies associated with a particular company.

Parameters:

Name Type Description Default
language

(optional) ISO 639-1 code.

required
page

(optional) Minimum value of 1. Expected value is an integer.

required

Returns:

Type Description

A dict representation of the JSON returned from the API.

Source code in src/tmdb_client_py/movies.py
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
def movies(self, **kwargs):
    """
    Get the list of movies associated with a particular company.

    Args:
        language: (optional) ISO 639-1 code.
        page: (optional) Minimum value of 1.  Expected value is an integer.

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

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