Class RequestTag


  • public class RequestTag
    extends RequestBase<Tag>
    The RequestTagValue class returns the distinct values for a specific tag.

    For example, the distinct values for the tag_name 'Award Winning'. The content type and one or multiple tag names are required.

    You can filter the result using setTagFilters(Map), such as genre, year, rating, actor, artist or director.

    This class is returned by ContentDiscovery.getTagValuesRequest(String, Set) ()} (String)}.

    It has a method to execute request synchronously and asynchronously and also provides a set of Set methods for parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void executeAsync​(ContentDiscovery.Listener<Tag> listener)
      Gets the values for the tag asynchronously.

      A sample tag list is genre, rating, year or custom tag defined by the airline.
      java.util.List<Tag> executeSync()
      Gets the values for the tag synchronously.

      A sample tag list is genre, rating, year or custom tag defined by the airline.
      JSONObject getSocketPayload()  
      void setImageResolutions​(java.util.Set<java.lang.String> imageResolutions)
      Returns images, such as posters or synopses, in the specified resolution.
      void setImageSizeSelectors​(java.util.Set<java.lang.Integer> imageSizeSelectors)
      Returns images, such as posters or synopses, in the specified size as defined by the airline.
      void setSeatClass​(java.lang.String seatClass)
      Specifies the seat class, such as first or business.

      If not specified, SeatClass.All will be used.
      void setTagFilters​(java.util.Map<java.lang.String,​java.lang.String> tagFilters)
      Specifies the tags that are to be filtered.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setSeatClass

        public void setSeatClass​(java.lang.String seatClass)
        Specifies the seat class, such as first or business.

        If not specified, SeatClass.All will be used.
        Parameters:
        seatClass - Only accepts strings provided by SeatClass, such as first, business or all.
      • setImageSizeSelectors

        public void setImageSizeSelectors​(java.util.Set<java.lang.Integer> imageSizeSelectors)
        Returns images, such as posters or synopses, in the specified size as defined by the airline.

        When both image_size_selector and image_resolution are present, image_size_selector takes priority.

        If neither are present, all images will be returned.
        Parameters:
        imageSizeSelectors - Specify the image size.
      • setImageResolutions

        public void setImageResolutions​(java.util.Set<java.lang.String> imageResolutions)
        Returns images, such as posters or synopses, in the specified resolution. Format is widthxheight, such as "800x600".

        When both image_size_selector and image_resolution are present, image_size_selector takes priority.

        If neither are present, all images will be returned.
        Parameters:
        imageResolutions - Specify the image resolution.
      • setTagFilters

        public void setTagFilters​(java.util.Map<java.lang.String,​java.lang.String> tagFilters)
        Specifies the tags that are to be filtered.

        Sample tag list is genre, rating, year or custom tag defined by the airline.
        Parameters:
        tagFilters - Tags to be filtered.
      • executeSync

        public java.util.List<Tag> executeSync()
                                        throws ContentDiscovery.Exception
        Gets the values for the tag synchronously.

        A sample tag list is genre, rating, year or custom tag defined by the airline.
        Returns:
        A list of TagValue.
        Throws:
        ContentDiscovery.Exception - if error occurs.