The club tab is where all clubs reside. A separator between official clubs and unofficial clubs is required if the user is authenticated and at least one unofficial club is received from the API.
If the user is not authenticated, any unofficial clubs and non-publicly visible clubs will be automatically filtered out by the API.
GET api/community/club?is_official=1
GET api/community/club?is_official=0
In the club tab, a create club button should appear for the student users. First, call this API to retrieve the current user.
GET api/user/user/me
The field user_group is expected, if is "student", it means that the user is student. Meaning, the user can create clubs, so render the create club button.
After the user clicked the create club button, redirect the user to the club creation page, with the form. Within the form, call this API to retrieve club types as the choices for the user to pick.
GET api/category/club-type
After the user has filled all the required information and confirmed the club creation, call this API to create the club.
POST api/community/club
{
"name_th": "string",
"name_en": "string",
"description": "string",
"external_links": "string",
"logo": "image",
"banner": "image",
"is_accepting_requests": "boolean",
"founded_date": "date",
"status": "string (R, C, D)",
"club_type": "int"
}The event tab is where all events reside. No separator is needed, but an API is needed to be called twice.
If the user is not authenticated, any unapproved events and non-publicly visible events will be automatically filtered out by the API.
GET api/community/event?exclude_community_events=1
GET api/community/event/community
Events can be created by both students and lecturers, so render the button if the user is authenticated. After the user clicked the create event button, redirect the user to the event creation page, with the form. Within the form, call these two API to retrieve the event types and event series as the choices for the user to pick.
GET api/category/event-type
GET api/category/event-series
After the user has filled all the required information and confirmed the event creation, call this API to create the event.
POST api/community/event
{
"name_th": "string",
"name_en": "string",
"description": "string",
"external_links": "string",
"logo": "image",
"banner": "image",
"is_accepting_requests": "boolean",
"location": "string",
"start_date": "date",
"end_date": "date",
"start_time": "time",
"end_time": "time",
"is_cancelled": "boolean",
"event_type": "int",
"event_series": "int"
}The lab tab is where all labs reside. Just call an API and everything is done.
If the user is not authenticated, any non-publicly visible labs will be automatically filtered out by the API.
GET api/community/lab
In the lab tab, a create lab button should appear for the users. First, call this API to retrieve the current user.
GET api/user/user/me
The field user_group is expected, if is "lecturer", it means that the user is student. Meaning, the user can create clubs, so render the create lab button.
After the user clicked the create lab button, redirect the user to the lab creation page, with the form. After the user has filled all the required information and confirmed the lab creation, call this API to create the club.
POST api/community/lab
{
"name_th": "string",
"name_en": "string",
"url_id": "string",
"description": "string",
"external_links": "string",
"logo": "image",
"banner": "image",
"is_accepting_requests": "boolean",
"room": "string",
"founded_date": "date",
"tags": "string",
"status": "string (R, C, D)",
}- Token is required.
- Must be a lecturer.
The search bar can be used to search for clubs, events, and labs. API is needed to be called 4 times as listed here below.
GET api/community/club?search={string}
GET api/community/event?search={string}
GET api/community/event/community?search={string}
GET api/community/lab?search={string}
The {string} is the search query.
The profile icon reside at the top right of the screen, which links to your own profile. The current user can be retrieve with this API endpoint. Please note that this API endpoint does not accept any other requests than the GET request.
GET api/user/user/me