V1::ReviewsController
Reviews
update
Update an existing review and redirect to 'show' action
URL
PUT/PATCH /reviews/:idParâmetros obrigatórios
Nome | Tipo | Descrição |
---|---|---|
review | Hash | The review to create |
review[full_name] | String | Full name of the review giver |
review[body] | String | Content of the review |
review[rank] | Integer | Rank of the review between 1..5 |
Parâmetros opcionais
Nome | Tipo | Descrição |
---|---|---|
review[title] | String | Title of the review |
Objeto resposta
Review | The created review or a list of errors |
create
Create new review
URL
POST /school_products/:school_product_id/reviewsParâmetros obrigatórios
Nome | Tipo | Descrição |
---|---|---|
review | Hash | The review to create |
review[full_name] | String | Full name of the review giver |
review[body] | String | Content of the review |
review[rank] | Integer | Rank of the review between 1..5 |
Parâmetros opcionais
Nome | Tipo | Descrição |
---|---|---|
review[title] | String | Title of the review |
Objeto resposta
Review | The created review or a list of errors |
show
Get a reviews information
URL
GET /reviews/:idParâmetros obrigatórios
Nome | Tipo | Descrição |
---|---|---|
id | Integer | of the review |
Objeto resposta
Review | The requested review |
index
Get a list of reviews
URL
GET /school_products/:school_product_id/reviewsObjeto resposta
Array<Review> | The created reviews |
destroy
Destroy Review
URL
DELETE /reviews/:idParâmetros obrigatórios
Nome | Tipo | Descrição |
---|---|---|
id | Integer | Id of an review |