attribute_from_csm_age


Description:

[ Version ( since = "0.12.12" ) ]
public static ContentRatingValue attribute_from_csm_age (string id, uint age)

Gets the highest ContentRatingValue which is allowed to be seen by the given Common Sense Media age for the given subsection id.

For example, if the CSM age mappings for `violence-bloodshed` are: * age ≥ 0 for as_content_rating_value_none * age ≥ 9 for as_content_rating_value_mild * age ≥ 11 for as_content_rating_value_moderate * age ≥ 18 for as_content_rating_value_intense then calling this function with `violence-bloodshed` and age set to 17 would return as_content_rating_value_moderate . Calling it with age 18 would return as_content_rating_value_intense.

Parameters:

id

the subsection ID e.g. `violence-cartoon`

age

the CSM age

Returns:

the ContentRatingValue, or as_content_rating_value_unknown if unknown