Stormz

Developer


Votes

List votes

GET /v1/workshops/:workshop_id/cards/:card_id/votes

Response

200 OK
[
  {
    "id": "5007d396eb7abf319a000047",
    "value": 1,
    "user_id": "8007d396eb7abf319a000048"
  }
]

Vote on a card

POST /v1/workshops/:workshop_id/cards/:card_id/votes

Parameters

Name Type Description
value integer Required the value of the vote (cannot be 0)

Example

{
  "value": 1
}

Response

201 Created
{
  "id": "5007d396eb7abf319a000047",
  "value": 1,
  "user_id": "8007d396eb7abf319a000048"
}

Update vote

PUT /v1/workshops/:workshop_id/cards/:card_id/votes/:id

Parameters

Name Type Description
value integer the value of the vote (cannot be 0)

Example

{
  "value": 1
}

Response

204 No Content

Get vote

GET /v1/workshops/:workshop_id/cards/:card_id/votes/:id

Response

200 OK
{
  "id": "5007d396eb7abf319a000047",
  "value": 1,
  "user_id": "8007d396eb7abf319a000048"
}

Delete vote

DELETE /v1/workshops/:workshop_id/cards/:card_id/votes/:id

Response

204 No Content