横幅列表

提供配置橫幅所需資訊的列表。API 回應根據請求主體 type_banner 值分為三種類型。

  1. small: 提供一般橫幅、通知和滾動橫幅所需的信息。

  2. great: 只提供全螢幕橫幅所需的資訊。

  3. rolling: 只提供滾動橫幅所需的信息。

  4. 請求 URL

生產 URL https://promotion.qpyou.cn/api/banner
沙盒 URL https://sandbox-promotion.qpyou.cn/api/banner
HTTP 方法 POST
內容類型 text/html
數據格式 JSON
  • 標題
欄位名稱 描述 類型 必填
授權 確定 certificationKey 與 Bearer 授權的有效性 字串
  • 請求主體
字段名稱 描述 類型 是否必需
user 用戶信息 對象 Y
ㄴ uid Hive 會員 UID 字串 N
ㄴ vid 由 Hive 認證 v4 管理的 PlayerID 字串 N
ㄴ player_token 用戶認證信息 字串 N
ㄴ did Hive 配置發佈的唯一設備 ID 字串 Y
ㄴ world 遊戲伺服器信息 字串 Y
ㄴ language 遊戲或設備設置的語言代碼(ISO 639-1 標準) 字串 Y
ㄴ hive_country 如果沒有請求的國家信息值,則根據請求 IP 確定國家 字串 N
ㄴ age_gate_u13 是否適用 COPPA 所需的 13 歲年齡限制。將 Hive SDK 函數調用的結果值原樣傳遞自遊戲
  • true: 限制 13 歲以下用戶
  • false: 無限制
布林值 Y
game 遊戲信息 對象 Y
ㄴ appid 使用橫幅的遊戲的 AppID 字串 Y
ㄴ app_version 檢查的遊戲版本,以確定橫幅曝光以供審查 字串 Y
promotion 促銷活動信息 對象 Y
ㄴ type_camp 促銷活動類型(在 Hive 控制台註冊活動時選擇或直接輸入)
  • all: 所有類型
  • event: 活動類型
  • notice: 通知類型
  • cross: 跨活動類型
  • 其他: 用戶自定義通知類型,最多 10 個小寫英文字母
字串 Y
ㄴ type_banner 活動橫幅類型
  • small: 一般橫幅(條形橫幅)
  • great: 全屏橫幅
  • rolling: 滾動橫幅
字串 Y
  • 呼叫範例
curl -L -v 
-d '{
    "user": {
        "uid": "107812001",
        "vid": "10053342680",
        "player_token" : "61738cb65677c2451cb5c41e1a3bbc",
        "did": "5115990249",
        "world": "100006",
        "language": "ko",
        "hive_country": "KO",
        "age_gate_u13": false
    },
    "game": {
        "appid": "com.com2us.hivesdk.normal.freefull.google.global.android.common",
        "app_version": "1.1"
    },
    "promotion": {
        "type_camp": "all",
        "type_banner": "small"
    }
}' 
-H "Content-Type: application/json" 
https://sandbox-promotion.qpyou.cn/api/banner
  • 請求範例
> POST /api/banner HTTP/1.1
> User-Agent: curl/7.29.0
> Host: sandbox-promotion.qpyou.cn
> Accept: /
> Content-Type: application/json
> Content-Length: 292
  • 回應(請求主體 type_banner 值為 small:一般橫幅、通知、滾動橫幅)
字段名称 描述 类型 必需
result_code 响应代码
  • 200: 验证成功
  • 其他: 失败
整数
result_message 响应消息 字符串
count 横幅数量 整数
banner 横幅列表
如果没有注册横幅,数组为空 ([])
数组
ㄴ pid 推广活动 ID 字符串
ㄴ image 活动横幅图片 URL 字符串
ㄴ link 点击活动横幅时移动到的 URL 字符串
ㄴ image_direction 图片方向信息
  • landscape: 横向
  • portrait: 纵向
字符串
ㄴ start_date 活动开始时间 字符串
ㄴ end_date 活动结束时间 字符串
ㄴ start_unixtimestamp 活动开始时间 (Unix 时间戳) 整数
ㄴ end_unixtimestamp 活动结束时间 (Unix 时间戳) 整数
ㄴ type_link 点击活动横幅时的移动类型(在 Hive 控制台注册活动时选择)
  • webview: 移动到内部链接
  • webbrowser: 移动到外部链接
  • market: 移动到市场(应用商店)
  • notice: 移动到 Hive 通知
  • text: 移动到推广文本通知
  • interwork: 移动到游戏中指定的路径
  • none: 不移动
字符串
ㄴ interwork_data 提供 API 和参数以移动到游戏中的特定位置(如果没有信息,则为 NULL) 对象
ㄴㄴ api API URI 字符串
ㄴㄴ param 用于 API URI 的查询字符串参数值 字符串
ㄴ type_banner 活动横幅类型
  • small: 一般横幅
  • rolling: 滚动横幅
字符串
ㄴ type_camp 推广活动类型
  • event: 事件类型
  • notice: 通知类型
  • permit: 审核横幅
  • cross: 交叉横幅
字符串
ㄴ badge 通知即将结束的事件和礼物领取期限的徽章信息。只有一般横幅返回此字段值。滚动横幅始终返回 NULL。如果在 Hive 控制台中没有设置徽章信息 期间通知徽章,一般横幅也返回 NULL。通知根本没有此字段。 对象
ㄴㄴ title 徽章文本 字符串
ㄴㄴ type 显示的徽章类型
  • shutdown: 即将结束事件徽章
  • gift: 礼物领取期限通知徽章
字符串
ㄴㄴ start_date 徽章显示开始日期 (ISO-8601 格式) 字符串
ㄴㄴ end_date 徽章显示结束日期 (ISO-8601 格式) 字符串
ㄴㄴ start_unixtimestamp 徽章显示开始时间 (Unix 时间戳) 整数
ㄴㄴ end_unixtimestamp 徽章显示结束时间 (Unix 时间戳) 整数
notice_count 通知数量 整数
notice 通知帖子信息 数组
ㄴ nid 通知帖子 ID 字符串
ㄴ notice_type 通知帖子类型 字符串
ㄴ title 通知帖子标题 字符串
ㄴ link 通知帖子链接 URL 字符串
ㄴ start_date 帖子显示开始时间 字符串
ㄴ end_date 帖子显示结束时间 字符串
ㄴ start_unixtimestamp 帖子显示开始时间 (Unix 时间戳) 字符串
ㄴ end_unixtimestamp 帖子显示结束时间 (Unix 时间戳) 字符串
ㄴ view_count 帖子查看次数 字符串
ㄴ game_index 帖子游戏索引信息 字符串
ㄴ language 帖子设置语言代码 (ISO 639-1 标准) 字符串
rolling_count 滚动横幅数量 整数
rolling 滚动横幅信息 数组
ㄴ pid 推广活动 ID 字符串
ㄴ image 活动横幅图片 URL 字符串
ㄴ link 点击横幅时移动到的 URL 字符串
ㄴ image_direction 图片方向信息
  • landscape: 横向
  • portrait: 纵向
字符串
ㄴ start_date 活动开始时间 字符串
ㄴ end_date 活动结束时间 字符串
ㄴ start_unixtimestamp 活动开始时间 (Unix 时间戳) 字符串
ㄴ end_unixtimestamp 活动结束时间 (Unix 时间戳) 字符串
ㄴ type_link 点击活动横幅时的移动类型(在 Hive 控制台注册活动时选择)
  • webview: 移动到内部链接
  • webbrowser: 移动到外部链接
  • market: 移动到市场(应用商店)
  • notice: 移动到 Hive 通知
  • text: 移动到推广文本通知
  • interwork: 移动到游戏中指定的路径
  • none: 不移动
字符串
ㄴ type_banner 活動橫幅類型
  • small: 一般橫幅
  • rolling: 滾動橫幅
字串 N
ㄴ type_camp 促銷活動類型
  • event: 活動類型
  • notice: 通知類型
  • permit: 審核橫幅
  • cross: 交叉橫幅
字串 N
ㄴ interwork_data 提供API和參數以移動到遊戲中的特定位置(如果沒有信息,則為NULL) 物件 N
ㄴㄴ api API URI 字串 N
ㄴㄴ param 用於API URI的查詢字串參數值 字串 N
  • 結果代碼
代碼 訊息 描述
200 成功 數據成功傳送
  • 回應範例(一般橫幅、通知、滾動橫幅)
< HTTP/1.1 200 OK
< Server: nginx
< Date: Tue, 15 Mar 2022 03:22:54 GMT
< Content-Type: text/html; charset=UTF-8
{
    "banner": [
        {
            "pid": "202456",
            "image": "http://hive-fn.qpyou.cn/hivepromotion/banner/2008/6227_1598855945930_crosscopy.jpg",
            "link": "http://test-promotion.qpyou.cn/news/direct/202456",
            "image_direction": "landscape",
            "start_date": "2020-08-31 15:32:00",
            "end_date": "2023-08-10 18:30:00",
            "start_unixtimestamp": 1598855520,
            "end_unixtimestamp": 1691659800,
            "type_link": "market",
            "type_banner": "small",
            "type_camp": "cross",
            "interwork_data": null,
            "badge": {
                "title": "Gift Collection Period",
                "type": "gift",
                "start_date": "2023-03-23T16:30:00+09:00",
                "end_date": "2023-10-28T16:25:00+09:00",
                "start_unixtimestamp": 1679556600,
                "end_unixtimestamp": 1698477900
            }
        {
            "pid": "203408",
            "image": "http://hive-fn.qpyou.cn/hivepromotion/banner/2302/3064_1675413872939_5017_1649923083718_0418_one_640_ko.jpg",
            "link": "",
            "image_direction": "landscape",
            "start_date": "2023-02-03 16:30:00",
            "end_date": "2023-02-06 17:43:00",
            "start_unixtimestamp": 1675409400,
            "end_unixtimestamp": 1675672980,
            "type_link": "none",
            "type_banner": "small",
            "type_camp": "cross",
            "interwork_data": null,
            "badge" : null
        },
        {
            "pid": "203392",
            "image": "http://hive-fn.qpyou.cn/hivepromotion/banner/2301/5210_1675144150263_landscape.png",
            "link": "http://test-promotion.qpyou.cn/news/direct/203392",
            "image_direction": "landscape",
            "start_date": "2023-01-31 14:48:00",
            "end_date": "2023-02-28 14:48:00",
            "start_unixtimestamp": 1675144080,
            "end_unixtimestamp": 1677563280,
            "type_link": "interwork",
            "type_banner": "small",
            "type_camp": "event",
            "interwork_data": {
                "api": "/language",
                "param": "param=japanese"
            },
            "badge" : null
        }
    ],
    "count": 3,
    "notice": [
        {
            "nid": "96274",
            "notice_type": "Guide",
            "title": "all23",
            "link": "http://test-promotion.qpyou.cn/news/notice/96274",
            "start_date": "2022-07-14 09:55:00",
            "end_date": "9999-12-31 00:00:00",
            "start_unixtimstamp": 1657760100,
            "end_unixtimstamp": 253402182000,
            "view_count": "0",
            "game_index": "2790",
            "language": "ko"
        },
        {
            "nid": "70268",
            "notice_type": "Event",
            "title": "test",
            "link": "http://test-promotion.qpyou.cn/news/notice/70268",
            "start_date": "2020-10-01 11:12:00",
            "end_date": "9999-12-31 00:00:00",
            "start_unixtimstamp": 1601518320,
            "end_unixtimstamp": 253402182000,
            "view_count": "0",
            "game_index": "2790",
            "language": "ko"
        }
    ],
    "notice_count": 2,
    "rolling": [
        {
            "pid": "202855",
            "image": "http://hive-fn.qpyou.cn/hivepromotion/banner/2212/9529_1672308134293_2206_1620884709352_1206_1609131801104_pngitem_1172768.png",
            "link": "http://test-promotion.qpyou.cn/news/direct/202855",
            "image_direction": "landscape",
            "start_date": "2021-05-13 14:44:00",
            "end_date": "2023-05-19 14:44:00",
            "start_unixtimestamp": 1620884640,
            "end_unixtimestamp": 1684475040,
            "type_link": "webview",
            "type_banner": "small",
            "type_camp": "notice",
            "interwork_data": null ,
            "badge" : null
        }
    ],
    "rolling_count": 1,
    "result_code": 200,
    "result_message": "Success."
}
  • 回應(請求主體 type_banner 值為 greatrolling:全螢幕橫幅或滾動橫幅)
欄位名稱 描述 類型 必填
result_code 回應代碼
  • 200: 驗證成功
  • 其他: 失敗
字串 Y
result_message 回應訊息 字串 Y
count 橫幅數量 整數 Y
banner 橫幅列表
如果沒有註冊橫幅,則數組為空 ([])
陣列 Y
ㄴ pid 推廣活動 ID 字串 N
ㄴ image 活動橫幅圖片 URL 字串 N
ㄴ link 點擊活動橫幅時移動到的 URL 字串 N
ㄴ image_direction 圖片方向資訊
  • landscape: 橫向
  • portrait: 直向
字串 N
ㄴ start_date 活動開始時間 字串 N
ㄴ end_date 活動結束時間 字串 N
ㄴ start_unixtimestamp 活動開始時間 (Unix 時間戳) 整數 N
ㄴ end_unixtimestamp 活動結束時間 (Unix 時間戳) 整數 N
ㄴ type_link 點擊活動橫幅時的移動類型 (在 Hive 控制台註冊活動時選擇)
  • webview: 移動到內部連結
  • webbrowser: 移動到外部連結
  • market: 移動到市場 (應用商店)
  • notice: 移動到 Hive 通知
  • text: 移動到推廣文字通知
  • interwork: 移動到遊戲中指定的路徑
  • none: 不移動
字串 N
ㄴ interwork_data 提供 API 和參數以移動到遊戲中的特定位置 (如果沒有資訊,則為 NULL) 物件 N
ㄴㄴ api API URI 字串 N
ㄴㄴ param 用於 API URI 的查詢字串參數值 字串 N
ㄴ type_banner 活動橫幅類型
  • great: 全螢幕橫幅
  • small: 一般橫幅 (條形橫幅)
  • rolling: 滾動橫幅
字串 N
ㄴ type_camp 推廣活動類型 (在 Hive 控制台註冊活動時選擇或直接輸入)
  • event: 活動類型
  • notice: 通知類型
  • permit: 審核橫幅
  • cross: 跨界橫幅
字串 N
ㄴ badge 通知即將結束的活動和贈品收集期間的徽章資訊。滾動橫幅和全螢幕橫幅始終返回 NULL 物件 N
ㄴㄴ title 徽章文字 字串 N
ㄴㄴ type 顯示的徽章類型
  • shutdown: 即將結束活動的徽章
  • gift: 贈品收集期間通知徽章
字串 N
ㄴㄴ start_date 徽章顯示開始日期 (ISO-8601 格式) 字串 N
ㄴㄴ end_date 徽章顯示結束日期 (ISO-8601 格式) 字串 N
ㄴㄴ start_unixtimestamp 徽章顯示開始時間 (Unix 時間戳) 整數 N
ㄴㄴ end_unixtimestamp 徽章顯示結束時間 (Unix 時間戳) 整數 N
  • 結果代碼
代碼 訊息 描述
200 成功 數據成功傳送
  • 回應範例(全螢幕橫幅或滾動橫幅)
< HTTP/1.1 200 OK
< Server: nginx
< Date: Tue, 15 Mar 2022 03:22:54 GMT
< Content-Type: text/html; charset=UTF-8
{
    "banner": [
        {
            "pid": "203327",
            "image": "http://hive-fn.qpyou.cn/hivepromotion/banner/2212/2242_1671774095448_9554_1659585211300_pet3.png",
            "link": "http://test-promotion.qpyou.cn/news/direct/203327",
            "image_direction": "landscape",
            "start_date": "2022-12-23 14:39:00",
            "end_date": "2024-01-28 14:39:00",
            "start_unixtimestamp": 1671773940,
            "end_unixtimestamp": 1706420340,
            "type_link": "market",
            "type_banner": "great",
            "type_camp": "cross",
            "interwork_data": null,
            "badge" : null
        },
        {
            "pid": "200903",
            "image": "http://hive-fn.qpyou.cn/hivepromotion/banner/2007/4544_1593745965875_4221_1530011573_nuclear_h480.jpg",
            "link": "http://test-promotion.qpyou.cn/news/direct/200903",
            "image_direction": "landscape",
            "start_date": "2018-06-26 20:10:00",
            "end_date": "2026-06-26 20:10:00",
            "start_unixtimestamp": 1530011400,
            "end_unixtimestamp": 1782472200,
            "type_link": "market",
            "type_banner": "great",
            "type_camp": "cross",
            "interwork_data": null,
            "badge" : null
        },
        {
            "pid": "202666",
            "image": "http://hive-fn.qpyou.cn/hivepromotion/banner/2101/9377_1611539481422_inlink_800_ko.png",
            "link": "http://test-promotion.qpyou.cn/news/direct/202666",
            "image_direction": "landscape",
            "start_date": "2022-11-24 17:00:00",
            "end_date": "2025-01-31 16:49:00",
            "start_unixtimestamp": 1669276800,
            "end_unixtimestamp": 1738309740,
            "type_link": "webview",
            "type_banner": "great",
            "type_camp": "event",
            "interwork_data": null,
            "badge" : null
        },
        {
            "pid": "202667",
            "image": "http://hive-fn.qpyou.cn/hivepromotion/banner/2202/4588_1645527513984_4656_1643264582739_200225_smon_800_ko.png",
            "link": "http://test-promotion.qpyou.cn/news/direct/202667",
            "image_direction": "landscape",
            "start_date": "2021-01-21 16:54:00",
            "end_date": "2023-12-27 16:54:00",
            "start_unixtimestamp": 1611215640,
            "end_unixtimestamp": 1703663640,
            "type_link": "webbrowser",
            "type_banner": "great",
            "type_camp": "event",
            "interwork_data": null,
            "badge" : null
        },
        {
            "pid": "202668",
            "image": "http://hive-fn.qpyou.cn/hivepromotion/banner/2101/5562_1611216401413_marketlink_800_ko.png",
            "link": "http://test-promotion.qpyou.cn/news/direct/202668",
            "image_direction": "landscape",
            "start_date": "2021-01-21 17:02:00",
            "end_date": "2025-01-31 17:02:00",
            "start_unixtimestamp": 1611216120,
            "end_unixtimestamp": 1738310520,
            "type_link": "webview",
            "type_banner": "great",
            "type_camp": "event",
            "interwork_data": {
                "api": "/openurl",
                "param": "rurl=https%3A%2F%2Fqa-renew-community.summonerswar.com%2Fchronicles%2Fko-kr%2Fboard%2Fdetail%2F22%2F14002"
            },
            "badge" : null
        }
    ],
    "count": 5,
    "result_code": 200,
    "result_message": "Success."
}