sanmar_sdk.promostandards.media_content ======================================= .. py:module:: sanmar_sdk.promostandards.media_content .. autoapi-nested-parse:: SanMar's PromoStandards Media Content service, version 1.1.0. Lists the images and documents for a style or one part of it. SanMar serves images and documents only, not audio or video, and does not implement ``getMediaDateModified``. SanMar recommends asking for whole styles, which returns every color's images at once. Classes ------- .. autoapisummary:: sanmar_sdk.promostandards.media_content.MediaType sanmar_sdk.promostandards.media_content.ClassType sanmar_sdk.promostandards.media_content.MediaClass sanmar_sdk.promostandards.media_content.MediaItem sanmar_sdk.promostandards.media_content.MediaContentService Module Contents --------------- .. py:class:: MediaType Bases: :py:obj:`enum.StrEnum` The kinds of media SanMar serves. .. py:attribute:: IMAGE :value: 'Image' .. py:attribute:: DOCUMENT :value: 'Document' .. py:class:: ClassType Bases: :py:obj:`enum.IntEnum` The image classes SanMar's guide lists. PromoStandards defines more. .. py:attribute:: SWATCH :value: 1004 .. py:attribute:: PRIMARY :value: 1006 .. py:attribute:: FRONT :value: 1007 .. py:attribute:: REAR :value: 1008 .. py:attribute:: HIGH_RESOLUTION :value: 2001 .. py:class:: MediaClass(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` A classification of a piece of media, such as ``Front`` or ``Swatch``. .. py:attribute:: id :type: int :value: None .. py:attribute:: name :type: str :value: None .. py:class:: MediaItem(/, **data: Any) Bases: :py:obj:`sanmar_sdk.base.Record` One image or document. .. py:attribute:: product_id :type: str :value: None .. py:attribute:: part_id :type: str | None :value: None .. py:attribute:: url :type: str .. py:attribute:: media_type :type: str :value: None .. py:attribute:: classes :type: list[MediaClass] :value: None .. py:attribute:: color :type: str | None :value: None The color shown, as SanMar names it on the image. .. py:attribute:: description :type: str | None :value: None .. py:attribute:: single_part :type: bool :value: None Whether the media shows exactly the one part it is listed under. .. py:attribute:: file_size :type: decimal.Decimal | None :value: None .. py:attribute:: width :type: decimal.Decimal | None :value: None .. py:attribute:: height :type: decimal.Decimal | None :value: None .. py:attribute:: dpi :type: int | None :value: None .. py:attribute:: changed :type: datetime.datetime | None :value: None .. py:class:: MediaContentService(soap: SoapClient, credentials: Credentials) Bases: :py:obj:`sanmar_sdk.promostandards._common.PromoStandardsService` SanMar's PromoStandards Media Content service. .. py:attribute:: endpoint .. py:attribute:: version :value: '1.1.0' The PromoStandards version SanMar implements, sent as ``wsVersion``. .. py:method:: get(product_id: str, *, media_type: MediaType = MediaType.IMAGE, part_id: str | None = None, class_type: ClassType | int | None = None) -> list[MediaItem] List a style's images or documents, optionally for one part or one class.