Class RequestTag
- java.lang.Object
-
- aero.panasonic.inflight.services.contentdiscovery.v1.RequestBase<Tag>
-
- aero.panasonic.inflight.services.contentdiscovery.v1.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 usingsetTagFilters(Map), such as genre, year, rating, actor, artist or director.
This class is returned byContentDiscovery.getTagValuesRequest(String, Set)()} (String)}.
It has a method to execute request synchronously and asynchronously and also provides a set of Set methods for parameters.
-
-
Field Summary
-
Fields inherited from class aero.panasonic.inflight.services.contentdiscovery.v1.RequestBase
mLangCode, mSeatClass
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecuteAsync(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.JSONObjectgetSocketPayload()voidsetImageResolutions(java.util.Set<java.lang.String> imageResolutions)Returns images, such as posters or synopses, in the specified resolution.voidsetImageSizeSelectors(java.util.Set<java.lang.Integer> imageSizeSelectors)Returns images, such as posters or synopses, in the specified size as defined by the airline.voidsetSeatClass(java.lang.String seatClass)Specifies the seat class, such as first or business.
If not specified, SeatClass.All will be used.voidsetTagFilters(java.util.Map<java.lang.String,java.lang.String> tagFilters)Specifies the tags that are to be filtered.-
Methods inherited from class aero.panasonic.inflight.services.contentdiscovery.v1.RequestBase
cancel, getRequestId, setRequestCancelling
-
-
-
-
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 bySeatClass, 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.
-
executeAsync
public 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.- Parameters:
listener- Data is passed back in the listener. If data is retrieved successfully,ContentDiscovery.Listener.onDataReceived(List, RequestBase)is called.
If error occurs,ContentDiscovery.Listener.onError(ContentDiscovery.Error, RequestBase)is called.
-
getSocketPayload
public JSONObject getSocketPayload()
- Specified by:
getSocketPayloadin classRequestBase<Tag>
-
-