Documentation ¶
Overview ¶
Package review is a set of API functions to provide an ability to make reviews for a particular product
Index ¶
- Constants
- func APICreateProductReview(context api.InterfaceApplicationContext) (interface{}, error)
- func APIDeleteProductReview(context api.InterfaceApplicationContext) (interface{}, error)
- func APIGetProductRating(context api.InterfaceApplicationContext) (interface{}, error)
- func APIGetReview(context api.InterfaceApplicationContext) (interface{}, error)
- func APIListReviews(context api.InterfaceApplicationContext) (interface{}, error)
- func APIUpdateReview(context api.InterfaceApplicationContext) (interface{}, error)
Constants ¶
View Source
const ( ConstReviewCollectionName = "review" ConstRatingCollectionName = "rating" ConstErrorModule = "product/review" ConstErrorLevel = env.ConstErrorLevelActor )
Package global constants
Variables ¶
This section is empty.
Functions ¶
func APICreateProductReview ¶
func APICreateProductReview(context api.InterfaceApplicationContext) (interface{}, error)
APICreateProductReview creates a new review for a specified product
- product id should be specified in "productID" argument
- if "stars" argument specified and is not blank rating mark will be also created
func APIDeleteProductReview ¶
func APIDeleteProductReview(context api.InterfaceApplicationContext) (interface{}, error)
APIDeleteProductReview deletes existing review
- review ID should be specified in "reviewID" argument
func APIGetProductRating ¶
func APIGetProductRating(context api.InterfaceApplicationContext) (interface{}, error)
APIGetProductRating returns rating info for a specified product
- product id should be specified in "productID" argument
func APIGetReview ¶
func APIGetReview(context api.InterfaceApplicationContext) (interface{}, error)
APIGetReview returns an existing review for owner or admin
- review ID should be specified in "reviewID" argument
func APIListReviews ¶
func APIListReviews(context api.InterfaceApplicationContext) (interface{}, error)
APIListReviews returns a list of reviews for specified products
- product id could be specified in "productID" parameter
func APIUpdateReview ¶
func APIUpdateReview(context api.InterfaceApplicationContext) (interface{}, error)
APIUpdateReview updates an existing review
- review ID should be specified in "reviewID" argument
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.