You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to implement the functionality for users to apply any event as spectator or player and event hosts should be able to accept or reject applications.
For this purpose, I'm planning to implement following API endpoints:
POST 'api/posts/<id>/apply'
Parameters
Parameter
Description
Parameter Type
Data Type
id
ID of the event to apply
Path
Int
user_id
ID of the user applying to the event
Body
Int
type
Type of the applicant (spectator/player)
Body
String
GET'api/posts/<id>/applicants'
Parameters
Parameter
Description
Parameter Type
Data Type
id
ID of the event
Path
Int
POST 'api/posts/<post_id>/applicants/<applicant_id>'
Parameters
Parameter
Description
Parameter Type
Data Type
post_id
ID of the event
Path
Int
user_id
ID of the applicant
Path
Int
accept
status of the applicant
Body
Bool
The text was updated successfully, but these errors were encountered:
- Add API endpoint for applying to an event as spectator or player
- Add age and capacity checks for applicants
- Add API endpoint for accepting or rejecting applicants for an event by owner of the event
- Add capacity check while accepting applicants
- Change Eventpost model to have 2 different fields for spectator applicants and player applicants
- Add tests for applying as player or spectator, applying in full capacity situations, applying when not qualified for the event, accepting player or spectator, rejecting player or spectator, accepting in full capacity scenarios and fetching applicant list
I implemented the functionality along with unit tests. I needed to update eventpost model for convenience to access spectator and player applicants. Also, I changed the API I proposed above a bit. The final API is as following:
We need to implement the functionality for users to apply any event as spectator or player and event hosts should be able to accept or reject applications.
For this purpose, I'm planning to implement following API endpoints:
POST 'api/posts/<id>/apply'
GET'api/posts/<id>/applicants'
POST 'api/posts/<post_id>/applicants/<applicant_id>'
The text was updated successfully, but these errors were encountered: