Class RequestItem

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void executeAsync​(ContentDiscovery.Listener<Item> listener)
      Gets a list of items for a specific tag by the content type.
      java.util.List<Item> executeSync()
      Gets a list of items for a specific tag by the content type.
      JSONObject getSocketPayload()  
      java.util.Map<java.lang.String,​java.lang.String> getTagMap()  
      java.lang.String[] getTagNames()  
      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 setOrderBy​(java.lang.String orderBy)
      Identifies the field name to sort the results.
      void setPagination​(PagingOption paging)
      Identifies the pagination parameter for the page offset and page size.
      void setRequestedFields​(java.util.Set<java.lang.String> requestedFields)
      Returns the specified fields.
      void setSeatClass​(java.lang.String seatClass)
      Sets the seat class, such as first or business.
      void setSortOrder​(SortOrder sortOrder)
      Identifies the type of sort, such as "ascending", "descending"
      • Methods inherited from class java.lang.Object

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

      • getTagMap

        public java.util.Map<java.lang.String,​java.lang.String> getTagMap()
      • getTagNames

        public java.lang.String[] getTagNames()
      • setSeatClass

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

        If not specified, SeatClass.All will be used.
        Parameters:
        seatClass - Only accepts strings provided by SeatClass.
      • setRequestedFields

        public void setRequestedFields​(java.util.Set<java.lang.String> requestedFields)
        Returns the specified fields.

        If set, only the specified fields will be returned. Otherwise, all fields will be returned.
        Parameters:
        requestedFields - Specifies the fields to be returned.
      • 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 - Specifies 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 - Specifies the image resolution.
      • setOrderBy

        public void setOrderBy​(java.lang.String orderBy)
        Identifies the field name to sort the results.
        Parameters:
        orderBy - Specifies the field name.
      • setSortOrder

        public void setSortOrder​(SortOrder sortOrder)
        Identifies the type of sort, such as "ascending", "descending"
        Parameters:
        sortOrder - SortOrder
      • setPagination

        public void setPagination​(PagingOption paging)
        Identifies the pagination parameter for the page offset and page size.

        The offset sets the number of items to skip in the result. The default is 0 items to skip. If this offset is negative, 0 will be used. If the offset is greater than the total amount of the matched data, nothing will be returned.

        The page size sets the maximum number of items to return in the result. The default is 150 items. For example: offset=60&page_size=15 - The first 60 items will be skipped. Items 61 to 75 will be returned, if available.
        Parameters:
        paging - pagination
      • executeSync

        public java.util.List<Item> executeSync()
                                         throws ContentDiscovery.Exception
        Gets a list of items for a specific tag by the content type. This call is synchronous.

        Example: returns the list of tag 'Tom Hanks' for the content type 'media'. The result is a list of Tom Hanks movies and television shows.
        Returns:
        A list of items for a specific tag.
        Throws:
        ContentDiscovery.Exception - if error occurs.