Skip to main content

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.
ParamTypeDescription
idstringThe id of the product.
reviewstringThe review text.
tokenstringThe 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.
ParamTypeDescription
idstringThe 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.
ParamTypeDescription
idstringThe id of the review.
tokenstringThe authorization token.