取帖子详情

February 2, 2024 · View on GitHub

更新时间: unrecorded

请求地址

https://api.kurobbs.com/forum/getPostDetail

请求方式

POST

认证方式

token

请求头

字段类型内容备注
osversionstr-Android
devcodestr-2fba3859fe9bfe9099f2696b8648c2c6
distinct_idstr-765485e7-30ce-4496-9a9c-a2ac1c03c02c
countrycodestr-CN
ipstr10.0.2.233
modelstr2211133C
sourcestrandroid
langstrzh-Hans
versionstr1.0.9
versioncodestr1090
tokenstrtoken
content-typestrapplication/x-www-form-urlencoded
accept-encodingstrgzip
user-agentstrokhttp/3.10.0

请求体

字符串拼接

字段类型内容备注
isOnlyPublishernum(?)0
postIdnum帖子 id1133555470924988416
showOrderTypenum(?)2

响应体

json

根对象

字段类型内容备注
codenum返回值220: token 失效
200: 成功
msgstr提示信息请求成功
successbooltruetoken 有效时才有
dataobj帖子详情内容成功时才有

data 对象

字段类型内容备注
gameIdnum游戏 id战双 = 2, 鸣潮 = 3
isFollownum(?)0
isLikenum是否赞过0
postDetailobj帖子详情
isCollectnum(?)0
commentarr评论数组成员都是一级评论

postDetail 对象

字段类型内容备注
appealingbool(?)false
browseCountstr浏览量3
collectionCountnum(?)0
commentCountnum评论数2
gameForumIdnum板块 id战双 推荐=2, 伊甸闲庭=3, 攻略=4, 同人=5
鸣潮 推荐=9, 天诚茶馆=10, 同人=11
gameForumVoobj(?)
gameIdnum游戏 id战双 = 2, 鸣潮 = 3
gameNamestr游戏名战双帕弥什
headCodeUrlstr头像图片直链https://prod-alicdn-community.kurobbs.com/forum/1690015964827463788.jpg
idstr帖子 id1133555470924988416
isCopyrightbool是否原创true
isElitenum(?)0
isLocknum(?)0
isMinenum是否自己的帖子1
isOfficialnum(?)0
isRecommendnum(?)1
isTopnum(?)0
likeCountnum点赞数0
postContentarr帖子内容数组每段内容一个成员
postH5Contentstr帖子 H5 格式的内容下面的 响应示例 有几乎所有的类型
postTimestr人类易读的发帖时间刚刚/3分钟前/07-25
postTitlestr帖子标题测试标题
postTypenum(?)1
postUserIdstr发帖人 id10065669
reviewStatusnum审核状态?1
topicListarr话题数组
userHeadCodestr发帖人头像 id35
userLevelnum发帖人等级都是 0 级别看了
userNamestr发帖人昵称TomyJan

postDetail 中的 gameForumVo 对象

字段类型内容备注
forumDataTypenum(?)3
forumListShowTypenum(?)1
forumTypenum(?)https://prod-alicdn-community.kurobbs.com/forum/1690302277218520029.jpg
forumUiTypenum(?)1728
idnum板块 id3, 见 postDetail 对象
isOfficialnum(?)0
isSpecialnum(?)0
namestr板块名称伊甸闲庭
sortnum(?)3

postDetail 中的 postContent 成员对象

字段类型内容备注
contentstr文本内容contentType=1 时才有, 纯文本不带任何样式信息. 开头会多一个空格
contentLinkobj链接内容对象contentType=3 时才有
contentTypenum内容类型1 = 文本, 2 = 图片, 3 = 链接, 4 = 分隔符(实际是一个图片)
imgHeightnum图片高contentType=2 或 4 时为图片高度, 否则为0
imgWidthnum图片宽contentType=2 或 4 时为图片宽度, 否则为0
isCovernum(?)0
topicFlagnum(?)0
urlstr图片直链contentType=4 时才有, 分隔符图片的直链

postDetail 中的 postContent 中的 contentLink 对象

字段类型内容备注
iconUrlstr链接图标直链https://prod-alicdn-community.kurobbs.com/icon/1675408874807512191.png
isCustomTitlebool(?)false
isDeletebool(?)false
nickNamestr(?)
titlestr链接文本测试链接文本
urlstr链接地址https://vov.moe

postDetail 中的 topicList 成员对象

字段类型内容备注
postIdstr这个帖子的 id1133555470924988416
topicIdnum话题 id80
topicNamestr话题名称测试服

comment 对象

字段类型内容备注
commentContentarr评论内容数组postDetail 中的 postContent 成员对象
commentIdstr评论 id1133555624024195072
commentTimestr人类易读的评论时间刚刚/3分钟前/07-25
floornum楼层1
isLikenum是否赞过0
isMinenum是否自己发布的1
isOfficialnum(?)0
isPublishernum是否发布者1
likeCountnum点赞数0
replyCountnum评论的回复数1
replyVosarr评论的楼中楼评论数组
reviewStatusnum审核状态?1
userHeadCodestr评论人头像 id35
userHeadUrlstr评论人头像图片直链https://prod-alicdn-community.kurobbs.com/forum/1690015964827463788.jpg
userIdstr评论人 id10065669
userLevelnum评论人等级都是 0 级别看了
userNamestr评论人昵称TomyJan

comment 中的 replyVos 成员对象

字段类型内容备注
createTimenum回复 13 位时间戳1690302357000
isLikestr是否赞过0
isMinestr是否自己发表的1
isOfficialstr(?)0
isPublisherstr是否发布者1
likeCountstr回复点赞数0
postCommentIdstr回复的评论 id1133555624024195072
postCommentReplayIdstr回复的楼中楼 id0
replyContentStrstr回复内容文本开头会多一个空格
replyIdstr回复 id1133555777264369664
replyTimestr人类易读的回复时间刚刚/3分钟前/07-25
reviewStatusnum审核状态?1
toUserIdstr回复的评论者 id10065669
toUserNamestr(?)
userHeadCodestr回复者头像 id35
userHeadUrlstr回复者头像图片直链https://prod-alicdn-community.kurobbs.com/forum/1690015964827463788.jpg
userIdstr回复者 id10065669
userLevelnum回复者等级都是 0 级别看了
userNamestr回复者昵称TomyJan

示例

请求

const url = 'https://api.kurobbs.com/forum/getPostDetail'
const headers = {
    osversion: 'Android',
    devcode: '2fba3859fe9bfe9099f2696b8648c2c6',
    distinct_id: '765485e7-30ce-4496-9a9c-a2ac1c03c02c',
    countrycode: 'CN',
    ip: '10.0.2.233',
    model: '2211133C',
    source: 'android',
    lang: 'zh-Hans',
    version: '1.0.9',
    versioncode: '1090',
    token: 'eyJhbGciOiJIUzI1NiJ9.eyJjcmVhdGVkIjoxNjg5NDk4MDkxMjQ1LCJ1c2VySWQiOjEwMDY1NjY5fQ.AAAA_AAAAAAAAAAAAAAAAAAAAAAAAAAA-AAAAAAAAAA',
    'content-type': 'application/x-www-form-urlencoded',
    'accept-encoding': 'gzip',
    'user-agent': 'okhttp/3.10.0',
}

const formData = new URLSearchParams()
formData.append('isOnlyPublisher', 0)
formData.append('postId', 1133555470924988416)
formData.append('showOrderType', 2)
try {
    const response = await fetch(url, {
        method: 'POST',
        headers: headers,
        body: formData,
    })

    if (!response.ok) {
        console.error('fetch error: ', response.status, response.statusText)
    }

    const rsp = await response.json()

    if (rsp.code === 200) {
        console.info('api rsp:', JSON.stringify(rsp))
    } else {
        console.error('api error:', JSON.stringify(rsp))
    }
} catch (error) {
    console.error('fetch error:', error)
}

响应

{
    "code": 200,
    "data": {
        "gameId": 2,
        "isFollow": 0,
        "isLike": 0,
        "postDetail": {
            "appealing": false,
            "browseCount": "3",
            "collectionCount": 0,
            "commentCount": 2,
            "gameForumId": 3,
            "gameForumVo": {
                "forumDataType": 3,
                "forumListShowType": 1,
                "forumType": 1,
                "forumUiType": 1,
                "id": 3,
                "isOfficial": 0,
                "isSpecial": 0,
                "name": "伊甸闲庭",
                "sort": 3
            },
            "gameId": 2,
            "gameName": "战双帕弥什",
            "headCodeUrl": "https://prod-alicdn-community.kurobbs.com/forum/1690015964827463788.jpg",
            "id": "1133555470924988416",
            "isCopyright": true,
            "isElite": 0,
            "isLock": 0,
            "isMine": 1,
            "isOfficial": 0,
            "isRecommend": 1,
            "isTop": 0,
            "likeCount": 0,
            "postContent": [
                {
                    "content": " 测试文本内容",
                    "contentType": 1,
                    "imgHeight": 0,
                    "imgWidth": 0,
                    "isCover": 0,
                    "topicFlag": 0
                },
                {
                    "content": " 测试 h2 内容",
                    "contentType": 1,
                    "imgHeight": 0,
                    "imgWidth": 0,
                    "isCover": 0,
                    "topicFlag": 0
                },
                {
                    "content": " 测试 h1 内容",
                    "contentType": 1,
                    "imgHeight": 0,
                    "imgWidth": 0,
                    "isCover": 0,
                    "topicFlag": 0
                },
                {
                    "content": " 测试加粗内容",
                    "contentType": 1,
                    "imgHeight": 0,
                    "imgWidth": 0,
                    "isCover": 0,
                    "topicFlag": 0
                },
                {
                    "content": " 测试斜体内容",
                    "contentType": 1,
                    "imgHeight": 0,
                    "imgWidth": 0,
                    "isCover": 0,
                    "topicFlag": 0
                },
                {
                    "content": " 测试下划线内容",
                    "contentType": 1,
                    "imgHeight": 0,
                    "imgWidth": 0,
                    "isCover": 0,
                    "topicFlag": 0
                },
                {
                    "content": " 测试居中内容",
                    "contentType": 1,
                    "imgHeight": 0,
                    "imgWidth": 0,
                    "isCover": 0,
                    "topicFlag": 0
                },
                {
                    "content": " 测试居右内容",
                    "contentType": 1,
                    "imgHeight": 0,
                    "imgWidth": 0,
                    "isCover": 0,
                    "topicFlag": 0
                },
                {
                    "content": " 红色 绿色",
                    "contentType": 1,
                    "imgHeight": 0,
                    "imgWidth": 0,
                    "isCover": 0,
                    "topicFlag": 0
                },
                {
                    "content": " ",
                    "contentType": 1,
                    "imgHeight": 0,
                    "imgWidth": 0,
                    "isCover": 0,
                    "topicFlag": 0
                },
                {
                    "contentLink": {
                        "iconUrl": "https://prod-alicdn-community.kurobbs.com/icon/1675408874807512191.png",
                        "isCustomTitle": false,
                        "isDelete": false,
                        "nickName": "",
                        "title": "测试链接文本",
                        "url": "https://vov.moe"
                    },
                    "contentType": 3,
                    "imgHeight": 0,
                    "imgWidth": 0,
                    "isCover": 0,
                    "topicFlag": 0
                },
                {
                    "content": " ",
                    "contentType": 1,
                    "imgHeight": 0,
                    "imgWidth": 0,
                    "isCover": 0,
                    "topicFlag": 0
                },
                {
                    "contentType": 4,
                    "imgHeight": 30,
                    "imgWidth": 345,
                    "isCover": 0,
                    "topicFlag": 0,
                    "url": "https://prod-alicdn-community.kurobbs.com/postBanner/1676361604531109644.png"
                },
                {
                    "content": " ",
                    "contentType": 1,
                    "imgHeight": 0,
                    "imgWidth": 0,
                    "isCover": 0,
                    "topicFlag": 0
                },
                {
                    "contentType": 4,
                    "imgHeight": 30,
                    "imgWidth": 345,
                    "isCover": 0,
                    "topicFlag": 0,
                    "url": "https://prod-alicdn-community.kurobbs.com/postBanner/1676361707594208503.png"
                },
                {
                    "content": " ",
                    "contentType": 1,
                    "imgHeight": 0,
                    "imgWidth": 0,
                    "isCover": 0,
                    "topicFlag": 0
                },
                {
                    "content": " ",
                    "contentType": 1,
                    "imgHeight": 0,
                    "imgWidth": 0,
                    "isCover": 0,
                    "topicFlag": 0
                },
                {
                    "contentType": 2,
                    "imgHeight": 1080,
                    "imgWidth": 1728,
                    "isCover": 0,
                    "topicFlag": 0,
                    "url": "https://prod-alicdn-community.kurobbs.com/forum/1690302277218520029.jpg"
                },
                {
                    "content": " ",
                    "contentType": 1,
                    "imgHeight": 0,
                    "imgWidth": 0,
                    "isCover": 0,
                    "topicFlag": 0
                }
            ],
            "postH5Content": "\n <p><font color=\"#292b2f\">测试文本内容</font></p>\n <p><font color=\"#292b2f\" size=\"4\">测试 h2 内容</font></p>\n <p><font color=\"#292b2f\" size=\"5\">测试</font><font color=\"#292b2f\" size=\"4\"> </font><font color=\"#292b2f\" size=\"5\">h1</font><font color=\"#292b2f\" size=\"4\"> </font><font color=\"#292b2f\" size=\"5\">内容</font></p>\n <p><font size=\"4\"><b style=\"color: rgb(41, 43, 47);\">测试加粗内容</b></font></p>\n <p><font size=\"4\" color=\"#292b2f\"><b style=\"\"><i>测试斜体内容</i></b></font></p>\n <p><font size=\"4\" color=\"#292b2f\"><b style=\"\"><i><u>测试下划线内容</u></i></b></font></p>\n <p style=\"text-align: center;\"><font size=\"4\" color=\"#292b2f\"><b style=\"\"><i><u>测试居中内容</u></i></b></font></p>\n <p style=\"text-align: right;\"><font size=\"4\" color=\"#292b2f\"><b style=\"\"><i><u>测试居右内容</u></i></b></font></p>\n <p><font color=\"#ff3f4c\">红色&nbsp;</font><font color=\"#10c286\">绿色</font></p>\n <div class=\"w-e_link-card\" card-des=\"https://vov.moe,&amp;,测试链接文本\" data-module-name=\"link-card\" has-delete=\"true\" contenteditable=\"false\">\n  <div class=\"w-e_link-card_link-wrap\">\n   <img class=\"w-e_link-card_img\" src=\"https://prod-alicdn-community.kurobbs.com/icon/1675408874807512191.png\">\n   <div class=\"w-e_link-card_detail\">\n    <span class=\"w-e_link-card_title w-e_hide-font--nowrap\" custom-title=\"false\">测试链接文本</span>\n    <span class=\"w-e_link-card_address w-e_hide-font--nowrap\">https://vov.moe</span>\n   </div>\n  </div>\n </div>\n <div class=\"w-e_line-card\" data-module-name=\"line-card\" has-delete=\"true\" contenteditable=\"false\">\n  <img class=\"w_e_line_image\" img-des=\"345,30,https://prod-alicdn-community.kurobbs.com/postBanner/1676361604531109644.png\" width=\"100%\" src=\"https://prod-alicdn-community.kurobbs.com/postBanner/1676361604531109644.png\">\n </div>\n <div class=\"w-e_line-card\" data-module-name=\"line-card\" has-delete=\"true\" contenteditable=\"false\">\n  <img class=\"w_e_line_image\" img-des=\"345,30,https://prod-alicdn-community.kurobbs.com/postBanner/1676361707594208503.png\" width=\"100%\" src=\"https://prod-alicdn-community.kurobbs.com/postBanner/1676361707594208503.png\">\n </div>\n <p><br></p>\n <div class=\"w-e_img-card\" data-module-name=\"img-card\" has-delete=\"true\" contenteditable=\"false\">\n  <img class=\"w_e_network_image\" img-des=\"1728,1080,https://prod-alicdn-community.kurobbs.com/forum/1690302277218520029.jpg\" listen-img-load=\"true\" src=\"https://prod-alicdn-community.kurobbs.com/forum/1690302277218520029.jpg\">\n </div>\n <p><br></p>\n",
            "postTime": "2分钟前",
            "postTitle": "测试标题",
            "postType": 1,
            "postUserId": "10065669",
            "reviewStatus": 1,
            "topicList": [
                {
                    "postId": "1133555470924988416",
                    "topicId": 80,
                    "topicName": "测试服"
                }
            ],
            "userHeadCode": "35",
            "userLevel": 0,
            "userName": "TomyJan"
        },
        "isCollect": 0,
        "comment": [
            {
                "commentContent": [
                    {
                        "content": " 测试评论_[/库街区-爱你]",
                        "contentType": 1,
                        "imgHeight": 0,
                        "imgWidth": 0,
                        "isCover": 0,
                        "topicFlag": 0
                    }
                ],
                "commentId": "1133555624024195072",
                "commentTime": "1分钟前",
                "floor": 1,
                "isLike": 0,
                "isMine": 1,
                "isOfficial": 0,
                "isPublisher": 1,
                "likeCount": 0,
                "replyCount": 1,
                "replyVos": [
                    {
                        "createTime": 1690302357000,
                        "isLike": 0,
                        "isMine": 1,
                        "isOfficial": 0,
                        "isPublisher": 1,
                        "likeCount": 0,
                        "postCommentId": "1133555624024195072",
                        "postCommentReplayId": "0",
                        "replyContentStr": " 测试楼中楼",
                        "replyId": "1133555777264369664",
                        "replyTime": "1分钟前",
                        "reviewStatus": 1,
                        "toUserId": "10065669",
                        "toUserName": "",
                        "userHeadCode": "35",
                        "userHeadUrl": "https://prod-alicdn-community.kurobbs.com/forum/1690015964827463788.jpg",
                        "userId": "10065669",
                        "userLevel": 0,
                        "userName": "TomyJan"
                    }
                ],
                "reviewStatus": 1,
                "userHeadCode": "35",
                "userHeadUrl": "https://prod-alicdn-community.kurobbs.com/forum/1690015964827463788.jpg",
                "userId": "10065669",
                "userLevel": 0,
                "userName": "TomyJan"
            }
        ]
    },
    "msg": "请求成功",
    "success": true
}