Package | com.brightcove.api.modules |
Class | public class SearchModule |
Inheritance | SearchModule ![]() ![]() |
Method | Defined By | ||
---|---|---|---|
SearchModule(module:Object)
Constructor. | SearchModule | ||
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = true):void [override]
Adds a listener for an event. | APIModule | |
findAllVideos(pageSize:uint = 20, pageNumber:uint = 0, sortBy:String = null, sortOrder:String = null, getItemCount:Boolean = false):VideoSearch
Find all videos belonging to a particular publisher id. | SearchModule | ||
findRelatedVideos(videoID:Number, pageSize:uint = 20, pageNumber:uint = 0, getItemCount:Boolean = false):VideoSearch
Finds videos related to the given video. | SearchModule | ||
findVideosByTags(andTags:Array = null, orTags:Array = null, pageSize:uint = 20, pageNumber:uint = 0, sortBy:String = null, sortOrder:String = null, getItemCount:Boolean = false):VideoSearch
Performs a search on all the tags of the videos in this account, and returns
a collection of videos that contain the specified tags. | SearchModule | ||
findVideosByText(text:String, pageSize:uint = 20, pageNumber:uint = 0, getItemCount:Boolean = false):VideoSearch
Performs a search through all the given publisher's videos, and returns
a collection of videos that match the specified text. | SearchModule | ||
getMaxItemsInMemory():uint
Returns the maximum number of videos that will be stored by the SearchManager before
being automatically purged. | SearchModule | ||
getVideoSearch(id:Number):VideoSearch
Returns the VideoSearch saved within an object map by the specified ID. | SearchModule | ||
![]() | removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void [override]
Removes a listener for an event. | APIModule | |
setMaxItemsInMemory(max:uint):void
Sets the maximum number of videos that will be stored by the SearchManager before
being automatically purged. | SearchModule |
Event | Summary | Defined By | ||
---|---|---|---|---|
Dispatched when an error occurs when performing a search. | SearchModule | |||
Dispatched when a successful search result is returned. | SearchModule |
SearchModule | () | Constructor |
public function SearchModule(module:Object)
Constructor.
Parametersmodule:Object — module to wrap with this API class.
|
findAllVideos | () | method |
public function findAllVideos(pageSize:uint = 20, pageNumber:uint = 0, sortBy:String = null, sortOrder:String = null, getItemCount:Boolean = false):VideoSearch
Find all videos belonging to a particular publisher id.
Parameters
pageSize:uint (default = 20 ) — of page. Number of entries returned.
| |
pageNumber:uint (default = 0 ) — page to retrieve.
| |
sortBy:String (default = null ) — to sort the results.
| |
sortOrder:String (default = null ) — for results.
| |
getItemCount:Boolean (default = false ) — retrieve the number of videos matching your search criteria.
|
VideoSearch |
findRelatedVideos | () | method |
public function findRelatedVideos(videoID:Number, pageSize:uint = 20, pageNumber:uint = 0, getItemCount:Boolean = false):VideoSearch
Finds videos related to the given video. Does a search based on short description, tags, and display name of all videos from this publisher. If the video has nothing related to it, this function will still return videos for being associated with that publisher.
Parameters
videoID:Number — id of the video we'd like related videos for.
| |
pageSize:uint (default = 20 ) — of page. Number of entries returned.
| |
pageNumber:uint (default = 0 ) — page to retrieve.
| |
getItemCount:Boolean (default = false ) — retrieve the number of videos matching your search criteria.
|
VideoSearch |
findVideosByTags | () | method |
public function findVideosByTags(andTags:Array = null, orTags:Array = null, pageSize:uint = 20, pageNumber:uint = 0, sortBy:String = null, sortOrder:String = null, getItemCount:Boolean = false):VideoSearch
Performs a search on all the tags of the videos in this account, and returns a collection of videos that contain the specified tags. Note that tags are case-sensitive.
Parameters
andTags:Array (default = null ) — the results to those that contain all of these tags.
| |
orTags:Array (default = null ) — the results to those that contain at least one of these tags.
| |
pageSize:uint (default = 20 ) — of page. Number of entries returned.
| |
pageNumber:uint (default = 0 ) — page to retrieve.
| |
sortBy:String (default = null ) — to sort the results.
| |
sortOrder:String (default = null ) — for results.
| |
getItemCount:Boolean (default = false ) — retrieve the number of videos matching your search criteria.
|
VideoSearch |
findVideosByText | () | method |
public function findVideosByText(text:String, pageSize:uint = 20, pageNumber:uint = 0, getItemCount:Boolean = false):VideoSearch
Performs a search through all the given publisher's videos, and returns a collection of videos that match the specified text.
Parameters
text:String — text we're searching with.
| |
pageSize:uint (default = 20 ) — of page. Number of entries returned.
| |
pageNumber:uint (default = 0 ) — page to retrieve.
| |
getItemCount:Boolean (default = false ) — retrieve the number of videos matching your search criteria.
|
VideoSearch |
getMaxItemsInMemory | () | method |
public function getMaxItemsInMemory():uint
Returns the maximum number of videos that will be stored by the SearchManager before being automatically purged. Once the maxItemsInMemory is reached, VideoSearch objects first created will have their pages purges completely until the number of videos is reduced to be within the maximum setting.
Returnsuint — The maximum number of items managed by the SearchManager.
|
getVideoSearch | () | method |
public function getVideoSearch(id:Number):VideoSearch
Returns the VideoSearch saved within an object map by the specified ID.
Parameters
id:Number — ID by which a VideoSearch was saved.
|
VideoSearch — The VideoSearch that was saved in an internal object map by the specified ID.
|
setMaxItemsInMemory | () | method |
public function setMaxItemsInMemory(max:uint):void
Sets the maximum number of videos that will be stored by the SearchManager before being automatically purged. Once the maxItemsInMemory is reached, VideoSearch objects first created will have their pages purges completely until the number of videos is reduced to be within the maximum setting.
Parameters
max:uint — maximum number of items managed by the SearchManager.
|
searchError | Event |
com.brightcove.api.events.SearchEvent
com.brightcove.api.events.SearchEvent.ERROR
Dispatched when an error occurs when performing a search.
The SearchEvent.ERROR constant defines the value of thetype
property of the event object for a
searchError
event.
searchResult | Event |
com.brightcove.api.events.SearchEvent
com.brightcove.api.events.SearchEvent.RESULT
Dispatched when a successful search result is returned.
The SearchEvent.RESULT constant defines the value of thetype
property of the event object for a
searchResult
event.