git clone https://github.com/typo-fisi/smart-campus-ambients.git
go run ./src/main/main.go
It will start the API at your local host on port 4000
docker compose up
Currently, the functional endpoints work as follows:
GET /api/assignments
→Assignment[]
:
[
{
"code": "INE002",
"name": "PROGRAMACIÓN Y COMPUTACIÓN",
"credits": "2.0",
"groups": [
{
"ambient_id": 301,
"professor": {
"Name": "SALINAS AZAÑA, GILBERTO ANÍBAL",
"Code": "089575"
},
"enrolled": "43",
"schedules": []
},
...
]
},
...
]
GET /api/assignments/{ID}
→Assignment
:
[
{
"code": {ID},
"name": "PROGRAMACIÓN Y COMPUTACIÓN",
"credits": "2.0",
"groups": [
{
"ambient_id": 301,
"professor": {
"Name": "SALINAS AZAÑA, GILBERTO ANÍBAL",
"Code": "089575"
},
"enrolled": "43",
"schedules": []
},
...
]
}
]
GET /api/ambients
→Ambient[]
:
[
{
"name": "Biblioteca",
"category": "miscelanea",
"ambient_id": 121,
"description": "Biblioteca de la facultad...",
"gallery": [],
"tags": []
},
...
]
GET /api/ambients/category/{category}
→Ambient[]
(of the same category):
[
{
"name": "Biblioteca",
"category": {category},
"ambient_id": 121,
"description": "Biblioteca de la facultad...",
"gallery": [],
"tags": []
},
...
]
GET /api/ambients/ambient_id?id={id}
→Ambient
:
In general the ambients will look like this:
[
{
"name": "Biblioteca",
"category": {category},
"ambient_id": 121,
"description": "Biblioteca de la facultad...",
"gallery": [],
"tags": []
}
]
In case the id belongs to a "salon", then it will look like this:
[
{
"name": "Salón 101",
"category": "salones",
"ambient_id": 112,
"description": "Salón del viejo pabellón de la facultad con aforo regular que se encuentra en el primer nivel.",
"gallery": [],
"tags": [],
"Assignments": [
{
"ambient_id": 112,
"professor": {
"Name": "PERALTA ORTIZ, VILMA",
"Code": "10665694"
},
"enrolled": "36",
"schedules": [
{
"day": 2,
"type": "T",
"from": "1400",
"to": "1600"
},
...
]
},
...
]
}
]