Rating
Type name: Rating
Extends Intangible
Name |
Type |
Description |
bestRating |
Number or Text |
The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed. |
ratingValue |
Text |
The rating for the content. |
worstRating |
Number or Text |
The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-03 UTC.
[null,null,["Last updated 2024-09-03 UTC."],[[["`Rating` is a structured data type used to specify the rating of an item, inheriting properties from the `Intangible` type."],["It includes fields like `ratingValue` for the actual rating, and `bestRating` and `worstRating` to define the rating scale, defaulting to 5 and 1 respectively if omitted."],["The values for `bestRating`, `ratingValue`, and `worstRating` can be represented using either `Number` or `Text` types."]]],["The `Rating` type, extending `Intangible`, defines a rating system with three properties: `bestRating`, `ratingValue`, and `worstRating`. `bestRating` and `worstRating` establish the upper and lower bounds of the rating scale, defaulting to 5 and 1, respectively, if omitted. `ratingValue` represents the actual rating given to the content using `Text` format. `bestRating` and `worstRating` can be set using either `Number` or `Text`.\n"]]