[−][src]Function proj17_iot_server::services::videos::find_relevant_video
pub fn find_relevant_video(
display_id: i32
) -> Result<Option<AdvertVideoOrder>, VideoServiceError>
Returns an Optional AdvertVideo for the most relevant video, None if there is no payed for video that matches the interests at the location
The video returned will be a random video for which the following
The video matches the highest weighted interest for which there is a payed video.
holds
Return values:
AdvertVideoOrder if a video matches
None if display exists but there are no matching videos
VideoServiceError::NoSuchDisplay if display does not exist
Arguments
display_id - an i32 representing a display id.