-
Notifications
You must be signed in to change notification settings - Fork 4
Teams
Alykhan Kanji edited this page Nov 21, 2019
·
9 revisions
GET /teams
Status: 200 OK
[
{
"id": 1,
"name": "t1",
"image": null,
"creator_id": "p1",
"hidden": false,
"participants": [
{
"id": 1,
"fbid": "p1"
}
],
"achievements": [
{
"id": 1,
"name": "a1",
"distance": 1
}
]
}
]
GET /teams/stats/:event
Status: 200 OK
[
{
"id": 1,
"name": "t1",
"image": null,
"hidden": false,
"distance": 10000,
"commitment": 100000
},
{
"id": 2,
"name": "t2",
"image": null,
"hidden": false,
"distance": 20000,
"commitment": 200000
}
]
GET /teams/:id
Status: 200 OK
{
"id": 1,
"name": "t1",
"image": null,
"creator_id": "p1",
"hidden": false,
"participants": [
{
"id": 1,
"fbid": "p1"
}
],
"achievements": [
{
"id": 1,
"name": "a1",
"distance": 1
}
]
}
POST /teams
Name | Type | Description |
---|---|---|
name | string | Required. The name of the team. |
image | string | The URL for the team image. |
creator_id | string | Required. The fbid of the creator. |
hidden | boolean | The visibility status of the team. Defaults to false . |
Status: 201 Created
{
"id": 1,
"name": "t1",
"image": null,
"creator_id": "p1",
"hidden": false
}
PATCH /teams/:id
Name | Type | Description |
---|---|---|
name | string | The name of the team. |
image | string | The URL for the team image. |
creator_id | string | The fbid of the creator. |
hidden | boolean | The visibility status of the team. |
Status: 200 OK
[1]
DELETE /teams/:id
Status: 204 No Content