Update page 'API Documentaion'
parent
d9162df05a
commit
ffcb03f4c3
|
@ -0,0 +1,147 @@
|
|||
## API Documentaion
|
||||
This section contains all needed infromation to access the TheCitadelofRicks API. It also contains the API specification.
|
||||
|
||||
### /courses
|
||||
Section that contains the specification for the courses get request. /courses returns a array of all available courses.
|
||||
|
||||
|
||||
``` json
|
||||
{
|
||||
"meta": {
|
||||
"totalCourses": 256
|
||||
},
|
||||
"courses": [
|
||||
{
|
||||
"name": "AI1"
|
||||
},
|
||||
{
|
||||
"name": "AI2"
|
||||
},
|
||||
{
|
||||
"name": "AI3"
|
||||
},
|
||||
...
|
||||
]
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### /timetable/{coursename}
|
||||
Section that contains the specification for the /timetable/{coursename} get request. /timetable/{coursename} returns 6 arrays (Monday to Saturday) containing the timetable. Each array (day) contains 7 lessons.
|
||||
Each lesson has the following values:
|
||||
* lessonID: formate: DAY.LESSON, range: 0.0 to 5.6 (0.0 = Monday.firstLesson, 5.6 = Saturday.lastLesson)
|
||||
* subject: the lesson subject
|
||||
* teacher: the lesson teacher
|
||||
* room: the room in which the lesson takes place
|
||||
* remark: additional info
|
||||
|
||||
``` json
|
||||
{
|
||||
"meta": {
|
||||
"coursename": "AI3"
|
||||
},
|
||||
"Monday": [
|
||||
{
|
||||
"lessonID": "0.0",
|
||||
"subject": "Computernetze 1",
|
||||
"teacher": "Mayer E.",
|
||||
"room": "A213",
|
||||
"remark": ""
|
||||
},
|
||||
{
|
||||
"lessonID": "0.1",
|
||||
"subject": "",
|
||||
"teacher": "",
|
||||
"room": "",
|
||||
"remark": ""
|
||||
},
|
||||
,
|
||||
{
|
||||
"lessonID": "0.2",
|
||||
"subject": "Systemprogramm.",
|
||||
"teacher": "Mayer E.",
|
||||
"room": "A213",
|
||||
"remark": ""
|
||||
},
|
||||
...
|
||||
],
|
||||
"Tuesday": [
|
||||
{
|
||||
"lessonID": "1.0",
|
||||
"subject": "",
|
||||
"teacher": "",
|
||||
"room": "",
|
||||
"remark": ""
|
||||
},
|
||||
{
|
||||
"lessonID": "1.1",
|
||||
"subject": "Softw. Engin. 1",
|
||||
"teacher": "Dorer",
|
||||
"room": "B005",
|
||||
"remark": ""
|
||||
},
|
||||
,
|
||||
{
|
||||
"lessonID": "1.2",
|
||||
"subject": "Softw. Engin. 1",
|
||||
"teacher": "Dorer",
|
||||
"room": "B005",
|
||||
"remark": ""
|
||||
},
|
||||
...
|
||||
],
|
||||
...
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### /mensamenu
|
||||
Section that contains the specification for the /mensamenu get request. /mensamenu returns a array containing this weeks mensa menu. The respones contains 6 arrays (Monday to Saturday), each with n meals.
|
||||
|
||||
``` json
|
||||
{
|
||||
"meta": {
|
||||
"coursename": "AI3"
|
||||
},
|
||||
"Monday": [
|
||||
{
|
||||
"heading": "Essen 1",
|
||||
"meal": "Cordon bleu vom Schwein\nBratensauce\nPommes frites\nBeilagensalat ",
|
||||
"additives": ""
|
||||
},
|
||||
{
|
||||
"heading": "Essen 2",
|
||||
"meal": "Cordon bleu vom Schwein\nBratensauce\nPommes frites\nBeilagensalat ",
|
||||
"additives": ""
|
||||
},
|
||||
{
|
||||
"heading": "Buffet",
|
||||
"meal": "Cordon bleu vom Schwein\nBratensauce\nPommes frites\nBeilagensalat ",
|
||||
"additives": ""
|
||||
},
|
||||
...
|
||||
],
|
||||
"Tuesday": [
|
||||
{
|
||||
"heading": "Essen 1",
|
||||
"meal": "Cordon bleu vom Schwein\nBratensauce\nPommes frites\nBeilagensalat ",
|
||||
"additives": ""
|
||||
},
|
||||
{
|
||||
"heading": "Essen 2",
|
||||
"meal": "Cordon bleu vom Schwein\nBratensauce\nPommes frites\nBeilagensalat ",
|
||||
"additives": ""
|
||||
},
|
||||
{
|
||||
"heading": "Buffet",
|
||||
"meal": "Cordon bleu vom Schwein\nBratensauce\nPommes frites\nBeilagensalat ",
|
||||
"additives": ""
|
||||
},
|
||||
...
|
||||
],
|
||||
...
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue