-
Notifications
You must be signed in to change notification settings - Fork 1
products.Class.ProductReviewService
tgreyuk edited this page Mar 23, 2025
·
8 revisions
github-wiki-example / products / ProductReviewService
Defined in: products.ts:151
Service for managing product reviews.
new ProductReviewService():
ProductReviewService
ProductReviewService
addProductReview(
review
):ProductReview
Defined in: products.ts:159
Add a new product review.
Parameter | Type | Description |
---|---|---|
review |
ProductReview |
The product review to be added. |
The added product review.
getAverageRating(
productId
):number
Defined in: products.ts:178
Get the average rating for a specific product.
Parameter | Type | Description |
---|---|---|
productId |
string |
The ID of the product. |
number
The average rating for the specified product.
getProductReviews(
productId
):ProductReview
[]
Defined in: products.ts:169
Get all product reviews for a specific product.
Parameter | Type | Description |
---|---|---|
productId |
string |
The ID of the product. |
An array of product reviews for the specified product.