fetchReviews
Constants
- addReview ⇒
Promise.<Object>
Add a review for a product.
- fetchReviewsById ⇒
Promise.<Object>
Fetch reviews by product id.
- deleteReview ⇒
Promise.<Object>
Delete a review by id.
addReview ⇒ Promise.<Object>
Add a review for a product.
Kind: global constant
Returns: Promise.<Object>
- The response data.
Throws:
Error
If the response status is not 201.
Param | Type | Description |
---|---|---|
id | string | The id of the product. |
review | string | The review text. |
token | string | The authorization token. |
fetchReviewsById ⇒ Promise.<Object>
Fetch reviews by product id.
Kind: global constant
Returns: Promise.<Object>
- The response data.
Throws:
Error
If the response status is not 200.
Param | Type | Description |
---|---|---|
id | string | The id of the product. |
deleteReview ⇒ Promise.<Object>
Delete a review by id.
Kind: global constant
Returns: Promise.<Object>
- The response data.
Throws:
Error
If the response status is not 200.
Param | Type | Description |
---|---|---|
id | string | The id of the review. |
token | string | The authorization token. |