按名字搜索老师和学生
儿童编程
搜索学生
Method and URL Structure
Method |
Resource URL |
Authorization |
GET |
/server/userinfo/search/ |
NO |
Request Parameters
Name |
Description |
Default |
Required |
page |
分页 |
1 |
False |
page_size |
每页数量 |
10 |
False |
search |
关键字 |
|
True |
cURL Example
curl -X GET -H 'Content-Type: application/json' http://localhost/server/userinfo/search/?search=张
Response Data
Name |
Description |
pk |
id |
name |
名字 |
avatar |
头像 |
owner |
用户名 |
Response
{
"count": 32,
"next": null,
"previous": null,
"results": [{
"pk": 4245,
"owner": "15208113778",
"name": "张宝哼哼",
"avatar": "https://static1.bcjiaoyu.com/head1@3x.png",
},]
搜索老师
Method and URL Structure
Method |
Resource URL |
Authorization |
GET |
/server/userinfo/teacher/search/ |
NO |
Request Parameters
Name |
Description |
Default |
Required |
page |
分页 |
1 |
False |
page_size |
每页数量 |
10 |
False |
search |
关键字 |
|
True |
cURL Example
curl -X GET -H 'Content-Type: application/json' http://localhost/server/userinfo/teacher/search/?search=张
Response Data
Name |
Description |
pk |
id |
name |
名字 |
username |
用户名 |
{
"count": 3,
"next": null,
"previous": null,
"results": [{
"pk": 7,
"name": "小赵",
"username": "18516271364"
}, {
"pk": 5,
"name": "小丽",
"username": "15201052252"
},.. ]
}