REST API for Team Sports Organization applications
Athlete (user in general) creation or retrieval
- GET - returns all the registered users (currently without their roles - player, goalie, referee - TBD)
- POST - creates a new athlete (user)
- Requires 'login', 'password', 'name' and 'email' parameters
Events creation/retrieval
- GET - returns all the events in the database
- POST - creates a new event
- Requires:
- 'name'
- 'organizer_id'
- 'total_places'
- 'start' - start of the event in format 'YYYY-MM-DDTHH:MM:SS'
- 'duration' - duration of the event in format 'HH:MM:SS'
- 'exp_level' - integer value from 1 to 6
- Requires:
- GET - return all the events in a given timeframe, specifically from YYYY-MM-DD 00:00:00 to YYYY-MM-DD 23:59:00
- Requires:
- 'start_date' - format 'YYYY-MM-DD'
- 'end_date' - format 'YYYY-MM-DD'
- Requires:
Specific event update/removal
- GET - retrieves the event with id <event_id> along with all the participants' details
- DELETE - deletes the event with id <event_id>
- PUT - updates the event with id <event_id>
- Requires: see /api/event
- GET - returns all the participants of the event <event_id>, grouped by their role (player, organizer, referee, goalie)
- POST - adds a new participant to the event <event_id>
- Requires 'athlete_id' and 'athlete_role' parameters
- DELETE - removes the participant from the given event
- Requires 'athlete_id' and 'athlete_role' parameters (athlete role probably redundant, as in one match only one role can be fulfilled - TBD)