From ffcb03f4c304fd649321e8110d43b975753bfc4d Mon Sep 17 00:00:00 2001 From: Seil0 Date: Tue, 6 Nov 2018 15:07:27 +0100 Subject: [PATCH] Update page 'API Documentaion' --- API-Documentaion.md | 147 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 API-Documentaion.md diff --git a/API-Documentaion.md b/API-Documentaion.md new file mode 100644 index 0000000..f769b1b --- /dev/null +++ b/API-Documentaion.md @@ -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": "" + }, + ... + ], + ... +} + +``` + +