接口路径(新):http://api.okayapi.com/api/App/Market_Notice/GetNoticeNow
接口路径(旧):http://api.okayapi.com/?s=App.Market_Notice.GetNoticeNow
接口描述: 获取当前日历公告,即此时此刻有效的公告列表。使用前请先安装日历公告插件
Parameter | Type | Required | Default | Note | Description |
---|---|---|---|---|---|
HTTP_APPKEY | String | Required | MIN: 32 | Common Put Your APPKEY |
请求:
{OKAYAPI_API_HOST}/?s=App.Market_Notice.GetNoticeNow&app_key={你的app_key}&sign={动态签名}
返回:
{
"ret": 200,
"data": {
"err_code": 0,
"err_msg": "",
"items": [
{
"id": "3",
"notice_content": "小白接口祝大家:元宵节快乐!",
"notice_url": "http://open.yesapi.cn/",
"notice_start_time": "2019-02-18 23:32:36",
"notice_end_time": "2019-02-22 23:32:37"
}
]
},
"msg": "小白开放接口:App.Market_Notice.GetNoticeNow"
}
<?php
// 引入文件
require_once dirname(__FILE__) . '/OkayApiClient.php';
// 调用小白开放接口
$rs = OkayApiClient::request('App.Market_Notice.GetNoticeNow');
// 输出结果
print_r($rs);
/*
Array
(
[ret] => 200
[data] => Array
(
[err_code] => 0
[err_msg] =>
[items] => Array
(
[0] => Array
(
[id] => 1
[notice_content] => 新春快乐!猪年诸事顺利!
[notice_url] =>
[notice_start_time] => 2019-02-09 07:36:29
[notice_end_time] => 2019-02-15 20:41:33
)
)
)
[msg] => 小白开放接口:App.Market_Notice.GetNoticeNow
)
*/
KEY | Type | Description |
---|---|---|
err_code | Int | 操作码,0表示成功,正数表示业务失败场景,负数表示系统失败场景 |
err_msg | String | 错误提示信息,err_code非0时参考此提示信息 |
notice_content | String | 公告内容 |
notice_url | String | 公告跳转链接 |
notice_start_time | String | 公告开始时间 |
notice_end_time | String | 公告结束时间 |
Power by OkayAPI.com Contact us (WA: okayapi OR Email: chanzonghuang@gmail.com).
Timezone: America/New_York Apr/26/2024 11:30:04