Skip to content

Commit 07716c6

Browse files
committed
update api
1 parent 92dd824 commit 07716c6

18 files changed

+70
-68
lines changed

README.md

+22-20
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,31 @@ All strings are encoded in UTF-8.
2727
## Endpoints
2828

2929
##### [Activity-Service]
30-
> /activity/v3
31-
- [/activities](activity-service/v3/activities.md)
32-
- [/announces](activity-service/v3/announces.md)
33-
- [/clubs](activity-service/v3/clubs.md)
30+
> /activity/v1
31+
- [/activities](activity-service/v1/activities.md)
32+
- [/announces](activity-service/v1/announces.md)
33+
- [/clubs](activity-service/v1/clubs.md)
3434

3535
##### [Location-Service]
36-
> /location/v3
37-
- [/search](location-service/v3/search.md)
38-
- [/places](location-service/v3/places.md)
39-
- [/units](location-service/v3/units.md)
40-
- [/faculties](location-service/v3/faculties.md)
41-
- [/buildings](location-service/v3/buildings.md)
36+
> /location/v1
37+
- [/search](location-service/v1/search.md)
38+
- [/places](location-service/v1/places.md)
39+
- [/units](location-service/v1/units.md)
40+
- [/faculties](location-service/v1/faculties.md)
41+
- [/buildings](location-service/v1/buildings.md)
4242

4343
##### [Course-Service]
4444
> /course/v1
4545
- [/status](course-service/v1/status.md)
46-
- [/unit/college](course-service/v1/unit/college.md)
47-
- [/unit/college/{collegeId}/department](course-service/v1/unit/college_department.md)
48-
- [/unit/department/{departmentId}/target](course-service/v1/unit/department_target.md)
49-
- [/course/{serialNo}](course-service/v1/course/course.md)
50-
- [/course/{serialNo}/limit](course-service/v1/course/limit.md)
51-
- [/search](course-service/v1/search/search.md)
52-
- [/search/department/{departmentId}](course-service/v1/search/department.md)
53-
- [/search/target/{targetId}](course-service/v1/search/target.md)
54-
- [/search/summer/{stage}](course-service/v1/search/summer.md)
46+
- [/colleges](course-service/v1/unit/college.md)
47+
- [/colleges/{collegeId}/departments](course-service/v1/unit/college_department.md)
48+
- [/departments/{departmentId}/targets](course-service/v1/search/departments_targets.md)
49+
- [/departments/{departmentId}](course-service/v1/search/departments_courses.md)
50+
- [/courses/{serialNo}](course-service/v1/course/course.md)
51+
- [/courses/{serialNo}/limit](course-service/v1/course/limit.md)
52+
- [/courses](course-service/v1/course/search.md)
53+
- [/targets/{targetId}/courses](course-service/v1/search/target.md)
54+
- [/summer/{stage}/courses](course-service/v1/search/summer.md)
5555
- [/student/selected](course-service/v1/student/selected.md)
5656
- [/student/rejected](course-service/v1/student/rejected.md)
5757
- [/student/tracking](course-service/v1/student/tracking.md)
@@ -66,8 +66,10 @@ All strings are encoded in UTF-8.
6666
HTTP Status Code | Description
6767
---------------- | -----------------
6868
400 | invalid body or parameter.
69-
403 | access a protected resource with an invalid access token.
69+
401 | access a protected resource with an invalid token.
70+
403 | access a protected resource with an token from invalid client.
7071
404 | resource not found.
72+
405 | invalid request method
7173
500 | internal server error.
7274

7375
## Problems?
File renamed without changes.
File renamed without changes.
File renamed without changes.

course-service/v1/course/course.md

+32-32
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Find Course Information
22

33
```
4-
GET /course/{serialNo}
4+
GET /courses/{serialNo}
55
```
66

77
## Description
@@ -24,7 +24,7 @@ GET /course/{serialNo}
2424

2525
## Example
2626
```
27-
GET /course/12034
27+
GET /courses/12034
2828
```
2929

3030
# Response
@@ -60,7 +60,7 @@ GET /course/12034
6060
<td>course name</td>
6161
</tr>
6262
<tr>
63-
<td>isCanceled</td>
63+
<td>isClosed</td>
6464
<td>Boolean</td>
6565
<td>is canceled or not.</td>
6666
</tr>
@@ -119,7 +119,7 @@ GET /course/12034
119119
</td>
120120
</tr>
121121
<tr>
122-
<td>usePasswordCard</td>
122+
<td>passwordCard</td>
123123
<td>Enum</td>
124124
<td>
125125
Password Card
@@ -151,8 +151,8 @@ GET /course/12034
151151
</tr>
152152
<tr>
153153
<td>teachers</td>
154-
<td>String</td>
155-
<td>separated by ","</td>
154+
<td>String Array</td>
155+
<td>teacher names</td>
156156
</tr>
157157
<tr>
158158
<td>credit</td>
@@ -161,11 +161,11 @@ GET /course/12034
161161
</tr>
162162
<tr>
163163
<td>classRooms</td>
164-
<td>String</td>
165-
<td>{building}-{classroom}, separated by ","</td>
164+
<td>String[]</td>
165+
<td>class room number with building code</td>
166166
</tr>
167167
<tr>
168-
<td>time</td>
168+
<td>times</td>
169169
<td>Object</td>
170170
<td>Key : Day of Week
171171
<table>
@@ -240,7 +240,7 @@ GET /course/12034
240240
</td>
241241
</tr>
242242
<tr>
243-
<td>limit</td>
243+
<td>maxStudents</td>
244244
<td>Number</td>
245245
<td>maximum amount of students, 0 means infinity.</td>
246246
</tr>
@@ -250,27 +250,27 @@ GET /course/12034
250250
```json
251251
[
252252
{
253-
"serialNo" : 12034,
254-
"no" : "EL5001",
255-
"classNo" : "*",
256-
"name" : "文學\/文化理論導讀",
257-
"isCanceled" : false,
258-
"memo" : "限三、四年級",
259-
"isMasterDoctor" : false,
260-
"language" : "Chinese",
261-
"usePasswordCard" : "no",
262-
"isFirstRun" : true,
263-
"isPreSelect" : true,
264-
"teachers" : "錢夫人,阿土伯",
265-
"credit" : 2,
266-
"classRooms" : "C2-209,C2-209",
267-
"time" : {
268-
"0": ["5"],
269-
"2": ["3", "4"]
270-
},
271-
"type" : "required",
272-
"fullHalf" : "half",
273-
"maxStudents" : 0
274-
}
253+
"serialNo" : 12034,
254+
"no" : "EL5001",
255+
"classNo" : "*",
256+
"name" : "文學/文化理論導讀",
257+
"isClosed" : false,
258+
"memo": "限三、四年級",
259+
"isMasterDoctor": false,
260+
"language": "國語",
261+
"passwordCard": "不使用",
262+
"isFirstRun": true,
263+
"isPreSelect": true,
264+
"teachers": [ "錢夫人", "阿土伯" ],
265+
"credit": 2,
266+
"classRooms": [ "C2-209", "C2-209" ],
267+
"times": {
268+
"0": ["5"],
269+
"2": ["3", "4"]
270+
},
271+
"type": "必修",
272+
"fullHalf": "",
273+
"maxStudents": 0
274+
}
275275
]
276276
```

course-service/v1/course/limit.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Find Course Limitation
22

33
```
4-
GET /course/{serialNo}/limit
4+
GET /courses/{serialNo}/limit
55
```
66

77
## Description
@@ -49,7 +49,7 @@ GET /course/{serialNo}/limit
4949

5050
## Example
5151
```
52-
GET /course/12034/limit?semester=1031
52+
GET /courses/12034/limit?semester=1031
5353
```
5454

5555
# Response

course-service/v1/search/search.md course-service/v1/course/search.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Search Course Information
22

33
```
4-
GET /search
4+
GET /courses
55
```
66

77
## Description
@@ -89,7 +89,7 @@ GET /search
8989

9090
## Example
9191
```
92-
GET /search?period=2&week=3
92+
GET /courses?period=2&week=3
9393
```
9494

9595
# Response

course-service/v1/search/department.md course-service/v1/search/departments_courses.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Search Course Information By Department
22

33
```
4-
GET /search/department/{departmentId}
4+
GET /departments/{departmentId}/courses
55
```
66

77
## Description
@@ -24,7 +24,7 @@ GET /search/department/{departmentId}
2424

2525
## Example
2626
```
27-
GET /search/department/deptI1I1000I0
27+
GET /departments/deptI1I1000I0/courses
2828
```
2929

3030
# Response

course-service/v1/unit/department_target.md course-service/v1/search/departments_targets.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Find Targets.
22

33
```
4-
GET /unit/department/{departmentId}/target
4+
GET /departments/{departmentId}/targets
55
```
66

77
## Description
@@ -24,7 +24,7 @@ GET /unit/department/{departmentId}/target
2424

2525
## Example
2626
```
27-
GET /unit/department/deptI1I1000I0/target
27+
GET /departments/deptI1I1000I0/targets
2828
```
2929

3030
# Response

course-service/v1/search/summer.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Search Summer Course Information
22

33
```
4-
GET /search/summer/{stage}
4+
GET /summer/{stage}/courses
55
```
66

77
## Description
@@ -24,7 +24,7 @@ GET /search/summer/{stage}
2424

2525
## Example
2626
```
27-
GET /search/summer/1
27+
GET /summer/1/courses
2828
```
2929

3030
# Response

course-service/v1/search/target.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Search Course Information By Target
22

33
```
4-
GET /search/target/{targetId}
4+
GET /targets/{targetId}/courses
55
```
66

77
## Description
@@ -24,7 +24,7 @@ GET /search/target/{targetId}
2424

2525
## Example
2626
```
27-
GET /search/target/cofuZdeptI1I1001I0ZcofgI0
27+
GET /targets/cofuZdeptI1I1001I0ZcofgI0/courses
2828
```
2929

3030
# Response

course-service/v1/unit/college.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Find All Colleges.
22

33
```
4-
GET /unit/college
4+
GET /colleges
55
```
66

77
## Description
@@ -24,7 +24,7 @@ GET /unit/college
2424

2525
## Example
2626
```
27-
GET /unit/college
27+
GET /colleges
2828
```
2929

3030
# Response

course-service/v1/unit/college_department.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Find Departments By College.
22

33
```
4-
GET /unit/college/{collegeId}/department
4+
GET /colleges/{collegeId}/departments
55
```
66

77
## Description
@@ -24,7 +24,7 @@ GET /unit/college/{collegeId}/department
2424

2525
## Example
2626
```
27-
GET /unit/college/deptI1I1000I0/department
27+
GET /colleges/deptI1I1000I0/departments
2828
```
2929

3030
# Response
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)