18 API Documentaion
Hannes Braun edited this page 7 months ago

API Documentaion

This section contains all needed infromation to access the TheCitadelofRicks API. It also contains the API specification.

/courseList

/courseList returns an array "courses" of all currently available courses at the HS Offenburg with their name and link to the timetable (current/first week).

{
   "meta":{
      "totalCourses":247,
      "time":1552406531
   },
   "courses":[
      {
         "courseName":"AI1",
         "courseLink":"https://www.hs-offenburg.de/index.php?id=6627&class=class&iddV=B6B2BF01-9DBA-4017-9245-4BEDF823E0CA&week=0"
      },
      {
         "courseName":"AI2",
         "courseLink":"https://www.hs-offenburg.de/index.php?id=6627&class=class&iddV=B6DB6637-51BA-47CC-BD69-9CEE1A336333&week=0"
      },
      {
         "courseName":"AI3",
         "courseLink":"https://www.hs-offenburg.de/index.php?id=6627&class=class&iddV=DA64F6FE-9DDB-429E-A677-05D0D40CB636&week=0"
      },
      ...
  ]
}

/timetable?course={coursename}&week={week}

/timetable returns an ArrayList "timetable" which contains an Array of 6 days, each day contains an Array of 6 ArrayLists which contain 0..n lessons. The meta part contains course name, the actual timetable link, the last update-time, the week index (starting with 0 for the current week), the calendar week and the year.

Each lesson has the following values:

  • lessonID: formate: DAY.TIMESLOT.LESSON, range: 0.0.0 to 5.5.x (0.0.0 = Monday.firstTimeslot.firstLesson, 5.6.x = Saturday.lastTimeslot.lastLesson)
  • subject: the lesson subject
  • teacher: the lesson teacher
  • room: the room in which the lesson takes place
  • remark: additional info
{
   "meta":{
      "updateTime":1552690660,
      "courseName":"AI4",
      "weekIndex":0,
      "weekNumberYear":11,
      "year":2019,
      "link":"https://www.hs-offenburg.de/index.php?id=6627&class=class&iddV=5D255C23-BC03-4AA0-9F36-DC6767F3E05D&week=0"
   },
   "timetable":{
      "days":[
         {
            "timeslots":[
               [
                  {
                     "lessonID":"0.0.0",
                     "lessonSubject":"Einzeltermin",
                     "lessonTeacher":"Dorer",
                     "lessonRoom":"B014",
                     "lessonRemark":"Kolloquium betriebliche Praxis"
                  }
               ],
               [
                  {
                     "lessonID":"0.1.0",
                     "lessonSubject":"Mathematik 4",
                     "lessonTeacher":"Decker E.",
                     "lessonRoom":"B121, B206",
                     "lessonRemark":""
                  },
                  {
                     "lessonID":"0.1.1",
                     "lessonSubject":"Mathematik 4",
                     "lessonTeacher":"Orb",
                     "lessonRoom":"B206, B121",
                     "lessonRemark":""
                  },
                  {
                     "lessonID":"0.1.2",
                     "lessonSubject":"Einzeltermin",
                     "lessonTeacher":"Dorer",
                     "lessonRoom":"B014",
                     "lessonRemark":"Kolloquium betriebliche Praxis"
                  }
               ]
            ]
         },
         ...
      ]
   }
}

/subjectList?course={coursename}&week={week}

/subjectList returns a HashSet with all unique lesson subjects of the given course and week.

[
   "Softw. Engin. 2",
   "Sem. IT-Anwendungen",
   "Prakt. Masch.Prog.",
   "Masch. Programm.",
   "Datenbanksyst. 2a",
   "Mathematik 4",
   "Datenbanksyst. 2b"
]

/lessons?course={coursename}&subject={subject}&week={week}

/lesson returns a ArrayList of Lessons for a subject with a given course and week.

Each lesson has the following values:

  • lessonID: formate: DAY.TIMESLOT.LESSON, range: 0.0.0 to 5.5.x (0.0.0 = Monday.firstTimeslot.firstLesson, 5.6.x = Saturday.lastTimeslot.lastLesson)
  • subject: the lesson subject
  • teacher: the lesson teacher
  • room: the room in which the lesson takes place
  • remark: additional info
[
   {
      "lessonID":"0.1.0",
      "lessonSubject":"Mathematik 4",
      "lessonTeacher":"Decker E.",
      "lessonRoom":"B121, B206",
      "lessonRemark":""
   },
   {
      "lessonID":"0.1.1",
      "lessonSubject":"Mathematik 4",
      "lessonTeacher":"Orb",
      "lessonRoom":"B206, B121",
      "lessonRemark":""
   },
   {
      "lessonID":"0.2.0",
      "lessonSubject":"Mathematik 4",
      "lessonTeacher":"Decker E.",
      "lessonRoom":"B121, B206",
      "lessonRemark":""
   },
   ...
]

/mensamenu

/mensamenu returns two arrays containing this and next weeks mensa menus. The response contains an array "days" of the type Meals for each day of the week (Monday to Sunday), meals therefore contains an ArrayList of n meals.

Each meal (element of meals) has the following values:

  • day: the day on which this meal is served
  • heading: the heading from the swfr website
  • parts: an Array of all parts of the meal
  • additives: info about alln additives in this meal
{
   "meta":{
      "mensaName":"Offenburg",
      "time":1552423539
   },
   "currentWeek":{
      "days":[
         {
            "meals":[
               {
                  "day":"Montag 11.03.",
                  "heading":"Essen 1",
                  "parts":[
                     "Gnocchi",
                     "Salbeibutter",
                     "Tomaten-Pilzragout",
                     "Geriebener Mozzarella",
                     "Beilagensalat"
                  ],
                  "additives":"enthält Allergene: Ei,Se,Gl,GlW,ML"
               },
               {
                  "day":"Montag 11.03.",
                  "heading":"Essen 2",
                  "parts":[
                     "Geflügel Saté-Spieß",
                     "Erdnusssauce",
                     "Butterreis",
                     "Chinagemüse"
                  ],
                  "additives":"enthält Allergene: Ei,Er,So,Sn,Fi,Se,Sa,Gl,GlW,GlG,ML"
               },
               {
                  "day":"Montag 11.03.",
                  "heading":"Buffet",
                  "parts":[
                     "Grill und Salatbar",
                     "Asiatisches aus dem Wok",
                     "Fleisch- und Fischspezialitäten",
                     "Pasta-, Reis und Kartoffelvariationen",
                     "Gemüse"
                  ],
                  "additives":""
               }
            ],
            ...
         }
      ]
   },
   "nextWeek":{
       ...
   }
}

/health

/health returns 200 as number. It can be used for health checks of the API service.

200

Du besuchst diese Seite mit einem veralteten IPv4-Internetzugang. Möglicherweise treten in Zukunft Probleme mit der Erreichbarkeit und Performance auf. Bitte frage deinen Internetanbieter oder Netzwerkadministrator nach IPv6-Unterstützung.
You are visiting this site with an outdated IPv4 internet access. You may experience problems with accessibility and performance in the future. Please ask your ISP or network administrator for IPv6 support.
Weitere Infos | More Information
Klicke zum schließen | Click to close