Skip to content

Latest commit

 

History

History
164 lines (116 loc) · 1.78 KB

votes.md

File metadata and controls

164 lines (116 loc) · 1.78 KB

Endpoint: Votes

Get Requests



URL : /Votes

Auth required : No

Permissions required : None

Content Example:

{
    "id": 1,
    "ip": "81.83.102.133",
    "songID": 3,
    "points": 12
},
{
    "id": 2,
    "ip": "81.83.102.120",
    "songID": 3,
    "points": 3
},
{
    "id": 3,
    "ip": "81.83.112.80",
    "songID": 1,
    "points": 8
}


URL : /Votes/{id}

Auth required : No

Permissions required : None


Success Response

Code: 200 Success

Content Example:

{
  "id": 1,
  "ip": "81.83.102.133",
  "songID": 3,
  "points": 12
}

Error Response

Code: 404 Not Found

Vote not found! Try another ID!


Post Requests



URL : /Votes

Auth required : Yes

Permissions required : None

Request Body Example:

{
  "ip": "string",
  "songID": 0,
  "points": 0
}

Success Response

Code : 200 Success

The Vote has been succesfully added!


Put Requests



URL : /Votes/{id}

Auth required : Yes

Permissions required : Admin

Request Body Example:

{
  "ip": "string",
  "songID": 0,
  "points": 0
}

Success Response

Code : 200 Success

The vote with id '{id}' has been updated succesfully!

Error Response

Code : 404 Not Found

Vote not found! Try another ID!


Delete Requests



URL : /Artists/{id}

Auth required : Yes

Permissions required : Admin

Success Response

Code : 200 Success

The vote with id '{id}' has been deleted succesfully!

Error Response

Code : 404 Not Found

Vote not found! Try another ID!