# 公告通知
# 获取班级公告列表
# 接口名称 :
GetClassNotificationList
# 接口说明 :
通过班级Id,获取已发布的班级公告列表
请求地址:
Java:https://openplatform-api.xiaobao100.com (opens new window)
请求方式:
GET
请求类型:
Content-Type: application/json
请求头:
"token":"@string"
"corp-id":"@string"
"xb-timestamp":"@integer"
"xb-sign-method":"sha256"
"xb-sign":"@string"
请求参数:
参数名 | 是否必填 | 参数类型 | 参数描述 |
---|---|---|---|
classId | 是 | integer | 班级Id,必填 |
pageIndex | 否 | integer | 页码,选填,如果不填,默认为1 |
pageSize | 否 | integer | 页容量,选填,如果不填,默认为1000,最大为1000 |
返回参数:
参数名 | 类型 | 说明 |
---|---|---|
data | object | 返回数据信息 |
totalCount | integer | └ 总记录数 |
currentIndex | integer | └ 当前页码 |
itemCount | integer | └ 返回的记录数 |
list | array | └ 返回数据列表 |
noticeId | integer | └└ 公告Id |
title | string | └└ 标题 |
content | string | └└ 内容 |
publishTime | datetime | └└ 发布时间。时间格式示例:2020-01-01 00:00:00 |
publisherId | integer | └└ 发布人Id |
publisherName | string | └└ 发布人中文名 |
publisherEName | string | └└ 发布人英文名 |
msgCN | string | 中文异常信息 |
msgEN | string | 英文异常信息 |
state | integer | 返回码 |
msg | string | 描述信息 |
请求示例(Java SDK):
TokenApi tokenApi = new TokenApi(String apiUrl);
TokenDTO dto = new TokenDTO();
dto.setAccessKeyId(String accessKeyId);
dto.setAccessKeySecret(String accessKeySecret);
String token = tokenApi.getToken(dto);
NotificationApi api = new NotificationApi(String apiUrl, String accesskeyId, String accessKeySecret, String token, String corpId);
api.getClassNotificationList(parameter [, parameter1, parameter2...])
返回示例:
{
"data": {
"totalCount": "@integer(60, 100)",
"currentIndex": "@integer(60, 100)",
"itemCount": "@integer(60, 100)",
"list": [
{
"noticeId": "@integer(60, 100)",
"title": "@string",
"content": "@string",
"publishTime": "@datetime",
"publisherId": "@integer(60, 100)",
"publisherName": "@string",
"publisherEName": "@string"
}
]
},
"msgCN": "@string",
"msgEN": "@string",
"state": 0,
"msg": "@string"
}