forked from ASwordsman/test_api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCourseLibrary.py
More file actions
34 lines (22 loc) · 1.04 KB
/
CourseLibrary.py
File metadata and controls
34 lines (22 loc) · 1.04 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
from core.rest_client import RestClient
class CourseLibrary(RestClient):
def coursewaregroup_get(self):
# 获取学校教程库的课件集
response = self.get('/social/services/rest/coursewareGroup/Inst/Coursewares?startPos=0&endPos'
'=19&categoryType=music_inst_all&search= ')
return response
def coursemusice_get(self):
# 获取学校音乐库
response = self.get('/social/services/rest/coursewareGroup/Inst/Coursewares?startPos=0&endPos=19'
'&categoryType=music_inst_all&search= ')
return response
def works_create(self, data, json):
# 创建作品
response = self.post('/social/services/rest/agc', data=data)
response.json()
self.put('/social/services/rest/agc/Pages', json=json)
def works_delete(self, contenid):
# contentid 作品的id
# 删除作品
response = self.delete('/social/services/rest/agc/Content/Agc/{}?serino=143').format(contenid)
return response