论坛API V2

回Api V2 首页

scope: douban_common_basic

获取讨论GET/v2/discussion/:id
更新讨论PUT/v2/discussion/:id
删除讨论DELETE/v2/discussion/:id

scope具体见target的文档,target指论坛所依附的产品对象名称

新发讨论POST/v2/target/:id/discussions
获取讨论列表GET/v2/target/:id/discussions

讨论 Discussion

{
    "id": "48247785",
    "title": "火炬不是亮点吗?",
    "alt": "http://www.douban.com/online/11215600/discussion/48247785/",
    "created": "2012-08-20 18":09":47",
    "updated": "2012-08-21 15":43":23",
    "content": "之前在场中央,之后却被挪走,这脑残设计!",
    "comments_count": 2,
    "author": User
}

获取讨论

GET https://api.douban.com/v2/discussion/:id

返回讨论 Discussion

更新讨论

PUT https://api.douban.com/v2/discussion/:id

请求参数

参数含义备注
title题目不能为空
content内容不能为空

返回状态202

删除讨论

DELETE https://api.douban.com/v2/discussion/:id

新发讨论

POST https://api.douban.com/v2/target/:id/discussions

请求参数同更新讨论,返回201,新创建的Discussion

获取讨论列表

GET https://api.douban.com/v2/target/:id/discussions

返回:

{
    "start": 0,
    "count": 10,
    "total": 30,
    "discussions" : [Discussion, ]
}

论坛回复

具体见回复 Api V2

scope: douban_common_basic

获取讨论回复列表GET/v2/discussion/:id/comments
回复讨论POST/v2/discussion/:id/comments
获取讨论单条回复GET/v2/discussion/:id/comment/:id
删除讨论回复DELETE/v2/discussion/:id/comment/:id

回Api V2 首页