通知公告
获取通知公告列表
请求方式:GET(HTTPS)
请求地址:/api/values/GetNotice
参数说明:
参数 | 参数类型 | 必须 | 说明 |
---|---|---|---|
appkey | string | 是 | 获取对应协会的appkey |
appsecret | string | 是 | 获取对应协会的appsecret |
timestamp | string | 是 | 获取当前时间戳(以秒为单位不是毫秒,毫秒需要除以1000) |
associationCode | string | 是 | 获取对应协会的协会短码 |
pagesize | int | 否 | 每页显示条数,非必填项,默认值8 |
pagenumber | int | 否 | 当前页,非必填项,默认值1 |
token | string | 是 | 签名验证 |
SDK请求示例(C#):
string url = "http://localhost:2102/api/values/GetNotice";
Dictionary<string, string> parames = new Dictionary<string, string>();
parames.Add("associationCode", "{code}");
parames.Add("appkey", "{appkey}");
parames.Add("appsecret", "{appsecret}");
parames.Add("timestamp", "{timestamp}");
parames.Add("token", "{token}");
url += "?" + GetUrl(parames);
HttpWebRequest request = null;
HttpWebResponse response = null;
request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "GET";
//获取服务器返回
response = (HttpWebResponse)request.GetResponse();
//获取HTTP返回数据
StreamReader sr = new StreamReader(response.GetResponseStream(), Encoding.UTF8);
string result = sr.ReadToEnd().Trim();
sr.Close();
response.Close();
返回结果:
{
"IsSuccess": true,
"Total": 24,
"List": [{
"Id": 511,
"NoticeName": "黄公告测试001",
"ReleaseTime": "2019-03-28T13:30:00"
}, {
"Id": 507,
"NoticeName": "公告关联问卷test",
"ReleaseTime": "2019-03-12T08:00:00"
}, {
"Id": 504,
"NoticeName": "定时测试黄001",
"ReleaseTime": "2019-03-07T16:37:00"
}, {
"Id": 503,
"NoticeName": "定时测试公告001",
"ReleaseTime": "2019-03-07T16:00:00"
}, {
"Id": 496,
"NoticeName": "20190304公文文件测试",
"ReleaseTime": "2019-03-04T11:00:00"
}, {
"Id": 483,
"NoticeName": "123123",
"ReleaseTime": "2019-02-22T14:00:00"
}, {
"Id": 478,
"NoticeName": "345",
"ReleaseTime": "2019-02-21T10:00:00"
}, {
"Id": 477,
"NoticeName": "21",
"ReleaseTime": "2019-02-21T10:00:00"
}]
}
参数 | 说明 |
---|---|
IsSuccess | 返回码 |
Total | 返回的数据总条数 |
List | |
└ Id | 公告Id |
└ NoticeName | 公告名称 |
└ ReleaseTime | 发布时间 |
调试: