get_media_rating


Description:

[ Version ( since = "0.10.0" ) ]
public unowned string get_media_rating (string rating_type)

Returns the rating of the given type for the video, if one exists.

For example, this could be a film rating awarded by the MPAA; or a simple rating specifying whether the video contains adult content.

The valid values for rating_type are: YOUTUBE_RATING_TYPE_MPAA and YOUTUBE_RATING_TYPE_V_CHIP. Further values may be added in future; if an unknown rating type is passed to the function, null will be returned.

The possible return values depend on what's passed to rating_type. Valid values for each rating type are listed in the documentation for the rating types.

Parameters:

this

a YouTubeVideo

rating_type

the type of rating to retrieve

Returns:

the rating of the video for the given rating_type, or null if the video isn't rated with that type (or the type is unknown)




2022 vala-language.org