Collections, are also called Saved Searches internally, this is because a collection is the set of video assets from a provider. As these are called Saved Search's within the API we shall be using this term for the rest of this article.
Purpose
A Saved Search is a predefined set of search criteria that are saved within the Oovvuu platform. This query is then executed up on request and cached for a period of 5 minutes. This will provide the embed service an updated list of video assets every five minutes. As such this mechanism provides the foundation for updating video rails, latest news pages or auto created videos in the fourth paragraph defined by a search criteria.
How to Use
Getting a Saved Search
fragment SavedSearchRailDetails onSavedSearch {
id
name
searchCriteria {
genre
keywordMatch
provider
}
selectedVideoIds
}
queryGetSavedSearch($id: ID!) {
savedSearch(id: $id) {
...SavedSearchRailDetails
}
}
Creating a Saved Search
To create a Saved Search
mutation CreateSavedSearch(
$name: String!
$searchCriteria: VideoFilter
$videoIds: [ID!]
) {
createSavedSearch(
input: {
name: $name
searchCriteria: $searchCriteria
selectedVideoIds: $videoIds
}
) {
id
}
}
The VideoFilter is a defined object that takes
Name | Type | Description |
keywordMatch | string[] | The list of keywords for match |
provider | id[] | the list of providers to use in the search |
genre | genre[] | the list of genres to use in the search |
Alternatively you are able to provide a list of videos that you wish to show. This list will never change, this is good for what is referred to as a curated list, this is a very select set of videos that never change.