Comments - GuiguiWeb/IIM_A2_GIT GitHub Wiki

Get the comments for a music using the music id.

ENDPOINT DEFINITION

GET http://localhost/api/comments.php?musicid=MUSICID

RESPONSE HEADER
Cache-Control: no-store, no-cache, must-revalidate
Connection: close
Content-Type: application/json
Date: Sat, 21 Apr 2018 10:52:11 +0000
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Host: localhost
Pragma: no-cache
X-Powered-By: PHP/7.2.4
RESPONSE BODY
{
    "comments": [
        {
            "id": "7",
            "uid": "1",
            "mid": "1",
            "message": "cdsfczec",
            "date": "2018-04-20 17:38:42",
            "user_id": "1",
            "username": "Git"
        },
        {
            "id": "3",
            "uid": "1",
            "mid": "1",
            "message": "dezef",
            "date": "2018-04-20 17:18:34",
            "user_id": "1",
            "username": "Git"
        },
        {
            "id": "1",
            "uid": "6",
            "mid": "1",
            "message": "Comment 1\n",
            "date": "2018-04-20 16:56:02",
            "user_id": "6",
            "username": "himiko"
        },
        {
            "id": "2",
            "uid": "1",
            "mid": "1",
            "message": "Commzdz\n",
            "date": "2018-04-20 15:37:21",
            "user_id": "1",
            "username": "Git"
        }
    ]
}