-
Notifications
You must be signed in to change notification settings - Fork 0
Location
Florian Schmidt edited this page Mar 21, 2016
·
1 revision
This section describes how to upload and retrieve locations for one or multiple teams
Everyone can access a list of all locations for a specific team at a specific event.
sample request
GET /event/EVENTID/team/TEAMID/location/ HTTP/1.1
Host: yourdomain.org
Connection: close
This returns a list of locations for the team with id TEAMID
at the event with id EVENTID
sample response
[
{
"latitude": 0.0,
"longitude": 1.1
},
{
"latitude": 0.0,
"longitude": 1.1
},
{
"latitude": 0.0,
"longitude": 1.1
}
]
Everyone can access a full list of all locations for all teams participating at a specific event
sample request
GET /event/EVENTID/team/locations/ HTTP/1.1
Content-Type: application/json
Host: yourdomain.org
Connection: close
sample response
[
{
"latitude": 0.0,
"longitude": 1.1
},
{
"latitude": 0.0,
"longitude": 1.1
},
{
"latitude": 0.0,
"longitude": 1.1
}
]
Only a user who is a participant and is part of a team can upload a location on behalf of this team. Therefore he needs to be authorised.
sample request
POST /event/EVENTID/team/TEAMID/location/ HTTP/1.1
Authorization: Bearer YOURACCESSTOKEN
Content-Type: application/json
Host: yourdomain.org
Connection: close
Content-Length: 32
{"latitude":0.0,"longitude":1.1}
sample response (201 CREATED)
{
"latitude": 0.0,
"longitude": 1.1
}