Repository navigation
Expand file tree
/
Copy pathAPI
More file actions
47 lines (31 loc) · 1.6 KB
/
Copy pathAPI
File metadata and controls
47 lines (31 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Spirit-News provides a small REST-API which is introduced here:
REST-Service for news:
/rest/1.0/news (Returns all news as JSON.)
Possible filters:
Parameters:
nr = The news number
semester = A degreecourse such as i2, mai3, etc.
date = A date in the format YYYYMMDD
/rest/1.0/news/{nr} (i.e. /155 returns the news with the nr. 155.)
/rest/1.0/news?semester={sem} (i.e. semester=I1 for all News for I1.)
/rest/1.0/news?date=YYYYMMDD (i.e. date=20110811 for all News after the 11th Aug 2011.)
/rest/1.0/news?preview=true (returns a preview with subject, writer, nr and date. NOTE:
The date filter may be applied.)
Example API calls:
/rest/1.0/news?semester=I2&date=20110811 (Combining the semester and date filter.)
/rest/1.0/news?semester=I2 (Only the semester filter.)
/rest/1.0/news?date=20110811 (Only the date filter.)
--------------------------------------------------------------------------------------------
REST-Service for the schedule:
/rest/1.0/schedule (Returns nothing ;).)
Possible filters:
Parameters:
sem = A degreecourse such as bai2, mai3, etc.
weekType = (u = odd,g = even,w = weekly)
/rest/1.0/schedule?classname={sem}
(i.e. classname=bamm3 returns the complete schedule for bamm3 as JSON.)
/rest/1.0/schedule?classname={sem}&week{weekType}
(i.e. classname=bamm3&week=u returns the schedule for bamm3 in an odd week.)
Example API calls:
/rest/1.0/schedule?classname=bamm1 (Return complete schedule.)
/rest/1.0/schedule?classname=bamm1&week=u (Combining both filters and returning the schedule for odd weeks.)