as

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

IContentRatingLevel

IContentRatingLevel

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

属性

ratingsSystem

readonly ratingsSystem: string

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

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

rating

readonly rating: string

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

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

方法

isLessOrEquallyRestrictiveThan()

isLessOrEquallyRestrictiveThan(other: IContentRatingLevel): Promise<boolean>

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

参数

other

IContentRatingLevel

抛出

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

返回值

Promise<boolean>

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

示例

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: 2026年7月22日