This action can be used to add ratings to restaurant.
The structure is following:
|portion_size||decimal||No, see below|
|portion_quality||decimal||No, see below|
|service_quality||decimal||No, see below|
Only user_id and restaurant_id is required for user to input; if free-form verbal review were not written, empty string must be returned instead of empty (or null) and if ratings are not given, a zero must be given instead, which means “no rating given” and will be handled so.
Ratings (from portion_size to location in the list) are decimals of user’s rating. It is bad practice to have user to input a number, though. Instead asking, for example, how many stars a restaurant will get in this field, so 1-5 star rating would directly map to integers 1-5 and 1-10 star rating would map to 1-5, and for example 3 would convert to 1.5 that will be sent as customer’s rate for the thing.
1 is lowest and 5 highest.
Sometimes, especially for mobile applications, asking for all these different fields for rating may be too excessive. In that case, client may just ask for 1-5 rating (or any format client wants to use) and then supply that data to each of fields and set generic_review to true.
generic_review defaults to false.
See error conventions section for explanation how error system works.
|INVALID_INPUT||None||There is no input. At least *something* needs to be given.|
|INVALID_MESSAGE||None||Message must not contain binary or only integers or other strange input.|
|INVALID_RESTAURANT_ID||None||Missing or not int.|
|MALFORMED_RATING_DATA||None||Rating can be missing, but if given, it must be proper float.|
|INVALID_GENERIC_REVIEW||None||The value given is not true or false.|