as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持

IContentRatingLevel

IContentRatingLevel

表示特定评级系统的评级范围内的评级等级。

属性

rating

readonly rating: string

返回评级的唯一识别密钥,该评级是ratingsSystem返回的评级系统中的有效评级。

待办事项

  • 指向有关所支持评级系统的评级量表的文档

ratingsSystem

readonly ratingsSystem: string

返回“评级系统”(一种特定的行业评级标准)的唯一识别密钥。

待办事项

  • 指向支持的评级系统的文档

方法

isLessOrEquallyRestrictiveThan()

isLessOrEquallyRestrictiveThan(other): Promise<boolean>

比较两个评级等级,以确定一个等级的限制程度是小于还是等于另一个等级。请注意,这是IContentRatingLevel对象域的部分函数;只能比较相同评级系统的评级等级。

参数

other

IContentRatingLevel

返回值

Promise<boolean>

如果和其他对象相比此对象的限制较少则为true,若相等则为false

抛出

尝试比较来自不同评级系统的评级等级时引发NoncomparableRatingsError。

示例

Given a={us_mpaa, G} and b={us_mpaa, PG-13}:
- `a->isLessOrEquallyRestrictiveThan(b) => true`
- `b->isLessOrEquallyRestrictiveThan(a) => false`
- `a->isLessOrEquallyRestrictiveThan(a) => true`

Given c={us_tv, TV-Y}:
- `a->isLessOrEquallyRestrictiveThan(c) => 引发NoncomparableRatingsError`
- `c->isLessOrEquallyRestrictiveThan(a) => 引发NoncomparableRatingsError`

Last updated: 2025年10月2日