-
Notifications
You must be signed in to change notification settings - Fork 0
TeamPlayer API
atsanan edited this page Sep 28, 2018
·
8 revisions
GET /api/v1/teamPlayer?page=0,limit=10
| Field | Description | Optional | Auth |
|---|---|---|---|
| teamPlayerName | Name of a team | No | admin |
| teamPlayerDetail | Detail of this team | Yes | admin |
Return
{
"data": {
"pageIndex": 0,
"pageLimit": 10,
"pages": 1,
"paging": {
"next": "",
"previous": ""
},
"teamPlayers": [
{
"_id": "5b3217ccbdfdd84f1fba1d1b",
"createAt": "2018-06-26T10:43:50.267Z",
"lastModified": "2018-06-26T10:43:50.267Z",
"teamPlayerDetail": {
"chi1": "chi1",
"chi2": "chi2",
"en": "en",
"th": "th"
},
"teamPlayerName": {
"chi1": "chi1",
"chi2": "chi2",
"en": "en",
"th": "th"
}
},
]
},
"isSuccess": true
}POST /api/v1/teamPlayer/add
| Field | Description | Optional | Auth |
|---|---|---|---|
| teamPlayerName | Name of a team | No | admin |
| teamPlayerDetail | Detail of this team | Yes | admin |
Returns:
{
"data": [
{
"id": "5b3217d8bdfdd84f1fba1d35",
"teamPlayerNameEng": "teamPlayerNameEng",
"teamPlayerNameThai": "teamPlayerNameThai",
"teamPlayerNameChi1": "teamPlayerNameChi1",
"teamPlayerNameChi2": "teamPlayerNameChi2",
"teamPlayerDetailEng": "teamPlayerDetailEng",
"teamPlayerDetailThai": "teamPlayerDetailThai",
"teamPlayerDetailChi1": "teamPlayerDetailChi1",
"teamPlayerDetailChi2": "teamPlayerDetailChi2",
"createAt": "2018-06-26T10:44:02.695Z",
"lastModified": "2018-06-26T10:44:02.695Z"
},
{
"id": "5b3217debdfdd84f1fba1d49",
"teamPlayerNameEng": "teamPlayerNameEng",
"teamPlayerNameThai": "teamPlayerNameThai",
"teamPlayerNameChi1": "teamPlayerNameChi1",
"teamPlayerNameChi2": "teamPlayerNameChi2",
"teamPlayerDetailEng": "teamPlayerDetailEng",
"teamPlayerDetailThai": "teamPlayerDetailThai",
"teamPlayerDetailChi1": "teamPlayerDetailChi1",
"teamPlayerDetailChi2": "teamPlayerDetailChi2",
"createAt": "2018-06-26T10:44:08.558Z",
"lastModified": "2018-06-26T10:44:08.558Z"
}
],
"isSuccess": true
}POST /api/v1/teamPlayer/{id: string}
| Field | Description | Optional | Auth |
|---|---|---|---|
| teamPlayerName | Name of a team | No | admin |
| teamPlayerDetail | Detail of this team | Yes | admin |
json
{
"data": {
"id": "5b3217d8bdfdd84f1fba1d35",
"teamPlayerName": "RedTeam2",
"teamPlayerDetail": "A+",
"createAt": "2018-06-26T10:44:02.695Z",
"lastModified": "2018-06-26T11:09:00.489Z"
},
"isSuccess": true
}