[][src]Function proj17_iot_server::endpoints::videos_endpoints::register_view

pub fn register_view(
    display_id: i32,
    video_id: i32,
    order_id: String,
    body: Json<VideoBody>
) -> Result<JsonValue, BadRequest<JsonValue>>

Registers a video view, granted the display_id, video_id, order_id, all exist. If all arguments are valid, a new played_advertisement row will be created in the database, and credits removed from the order_id. 1 credit will be withdrawn for each 8 seconds played.

Responds with:

This is an API endpoint mapped to

Arguments

url parameters:

Post body (json):

{ length_sec: <integer_length_of_played_video> }