本文档描述了订阅广告配置相关的接口规范。
/v2/subscribe/action/listGET无
data 字段)返回 List<TSubscribeAction> 数组。
数组中每个对象的结构如下:
| 字段名 | 类型 | 说明 |
|---|---|---|
id |
integer | 主键ID |
title |
string | 标题 |
description |
string | 描述 |
image |
string | 图片URL |
type |
integer | 类型(0:首页广告,1:订阅页面) |
lang |
string | 多语言配置 |
createTime |
string | 创建时间 |
GET /v2/subscribe/action/list
{
"code": 200,
"message": "success",
"success": true,
"data": [
{
"id": 1,
"title": "Summer Sale",
"description": "50% off for annual plan",
"image": "https://example.com/banner.png",
"type": 1,
"lang": "{\"en\":\"Summer Sale\",\"zh\":\"夏季促销\"}",
"createTime": "2023-10-01 12:00:00"
}
],
"timestamp": 1698806000000
}
/v2/subscribe/action/addPOST| 字段名 | 类型 | 必填 | 说明 |
|---|---|---|---|
title |
string | 是 | 标题 |
description |
string | 否 | 描述 |
image |
string | 否 | 图片URL |
type |
integer | 是 | 类型(0:首页广告,1:订阅页面) |
lang |
string | 否 | 多语言配置 |
POST /v2/subscribe/action/add
Content-Type: application/json
{
"title": "New Year Sale",
"description": "Best deal ever",
"image": "https://example.com/newyear.png",
"type": 0,
"lang": "{\"en\":\"New Year Sale\"}"
}
data 字段)返回 boolean,表示是否成功。
/v2/subscribe/action/updatePOST| 字段名 | 类型 | 必填 | 说明 |
|---|---|---|---|
id |
integer | 是 | 主键ID |
title |
string | 否 | 标题 |
description |
string | 否 | 描述 |
image |
string | 否 | 图片URL |
type |
integer | 否 | 类型(0:首页广告,1:订阅页面) |
lang |
string | 否 | 多语言配置 |
POST /v2/subscribe/action/update
Content-Type: application/json
{
"id": 1,
"title": "Updated Title",
"type": 1
}
data 字段)返回 boolean,表示是否成功。
/v2/subscribe/action/deletePOST| 字段名 | 类型 | 必填 | 说明 |
|---|---|---|---|
id |
integer | 是 | 主键ID |
POST /v2/subscribe/action/delete?id=1
data 字段)返回 boolean,表示是否成功。