Class RequestItem
- java.lang.Object
-
- aero.panasonic.inflight.services.contentdiscovery.v1.RequestBase<Item>
-
- aero.panasonic.inflight.services.contentdiscovery.v1.RequestItem
-
public class RequestItem extends RequestBase<Item>
The RequestItem class returns items filtered by tag values.
Sample tag parameters include:- genre and category
- year, price, people_score and duration - can be a range
- director, actor (if movie) and artist (if album)
- subtitle and soundtrack - ISO 639-3 language code
- rating ID associated to the media
For a complete list of tag values, please callContentDiscovery.getTagsRequest(String)adnContentDiscovery.getTagValuesRequest(String, Set).
This response is the same asContentDiscovery.getItemsDetailsRequest(Set), except this response does not includes children.
The class is returned byContentDiscovery.getItemsByTagValueRequest(String, Map)()} (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<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.JSONObjectgetSocketPayload()java.util.Map<java.lang.String,java.lang.String>getTagMap()java.lang.String[]getTagNames()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.voidsetOrderBy(java.lang.String orderBy)Identifies the field name to sort the results.voidsetPagination(PagingOption paging)Identifies the pagination parameter for the page offset and page size.voidsetRequestedFields(java.util.Set<java.lang.String> requestedFields)Returns the specified fields.voidsetSeatClass(java.lang.String seatClass)Sets the seat class, such as first or business.voidsetSortOrder(SortOrder sortOrder)Identifies the type of sort, such as "ascending", "descending"-
Methods inherited from class aero.panasonic.inflight.services.contentdiscovery.v1.RequestBase
cancel, getRequestId, setRequestCancelling
-
-
-
-
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 bySeatClass.
-
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.
-
executeAsync
public void executeAsync(ContentDiscovery.Listener<Item> listener)
Gets a list of items for a specific tag by the content type. This call is asynchronous.
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.- Parameters:
listener- Data is passed back in the listener. If data 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<Item>
-
-