Skip to content
Liu-Ameng edited this page Dec 9, 2013 · 5 revisions

Table of Contents

说明

返回文章列表。

URL

/article/list

请求方式

HTTP GET

请求参数

模式 参数字段 必选 说明
十大 type true 设为 top10
分区热门 type true 设为 sectop
secstr true 分区名,值为 ``0123456789GNHAC`` 中一个字符
美文推荐 type true 设为 commend
count false 希望查询的文章数量,默认为20篇,取值不小于1。实际文章数可能小于 count,所以最终返回文章数以实际情况为准。
startnum false 从所有推荐美文的第几篇起返回,取值不小于1。默认为从最新文章起,倒推 count 篇,若总文章不足 count 篇,则从第一篇(最老一篇)开始输出。
通知公告 type true 设为 announce
count false 希望查询的文章数量,默认为20篇,取值不小于1。实际文章数可能小于 count,所以最终返回文章数以实际情况为准。
startnum false 从所有通知公告的第几篇起返回,取值不小于1。默认为从最新文章起,倒推 count 篇,若总文章不足 count 篇,则从第一篇(最老一篇)开始输出。
版面文章 type true 设为 board
board true 查询版面名
btype true 返回文章列表模式
  • t 为主题模式
  • 其他为一般模式
count false 希望查询的文章数量,默认为20篇。实际文章数可能小于 count,所以最终返回文章数以实际情况为准。
startnum false 从该版所有文章的第几篇起返回,取值不小于1。默认为从最新文章起,倒推 count 篇,若总文章不足 count 篇,则从第一篇(最老一篇)开始输出。
userid true 当前登录用户的 ID
sessid true 当前用户的 session ID
appkey true 当前使用的 APP 标识
同主题文章 type true 设为 thread
board true 查询的版面名
thread true 查询的主题 ID
count false 希望查询的文章数量,默认为20篇。实际文章数可能小于 count,所以最终返回文章数以实际情况为准。
startnum false 确定从该版的第几个主题起返回,取值不小于1。默认为从最新文章起,倒推 count 篇,若总文章不足 count 篇,则从第一篇(最老一篇)开始输出。
userid true 当前登录用户的 ID
sessid true 当前用户的 session ID
appkey true 当前使用的 APP 标识

返回结果

若查询成功,返回如下格式:

{
	"errcode": 0,
	"articlelist": [
		{
			"type": 0,
			"aid": 1385540136,
			"tid": 1385540136,
			"th_num": 1,
			"mark": 4,
			"board": "sysop",
			"title": "[公告]任命sysop 版版主 liuche",
			"author": "XJTU-XANET" 
		}, ...
	]
}

其中:

字段 类型 说明
errcode int 0表示查询成功;否则为错误码,并且不再返回其它字段。
articlelist Json array 文章列表
type int 文章类型
  • 0 为一般文章
  • 1 为主题文章
aid int 文章 ID
tid int 主题 ID
th_num int 同主题文章数
mark int 文章标记,以2进制表示,从低到高依次的含义为:
  1. FH_READ 0x1 //whether the file has been viewed if it is a mail
  2. FH_HIDE 0x2 //whether the file has been set as hidden in backnumber
  3. FH_MARKED 0x4
  4. FH_DIGEST 0x8 //Has been put into digest
  5. FH_NOREPLY 0x10
  6. FH_ATTACHED 0x20 //Has attachments
  7. FH_DEL 0x40 //Marked to be deleted
  8. FH_SPEC 0x80 //Will be put to 0Announce, and this flag will be clear then
  9. FH_INND 0x100 //write into innd/out.bntp
  10. FH_ANNOUNCE 0x200 //have been put into 0Announce
  11. FH_1984 0x400 //have been checked to see if there is any ...
  12. FH_ISDIGEST 0x800 //whether it is a digest file, i.e., filename is start with G., but not M.
  13. FH_REPLIED 0x1000 //this mail has been replied
  14. FH_ALLREPLY 0x2000 //this article can be re by all...
  15. FH_MATH 0x4000 //this article contains itex math functions.
  16. FH_DANGEROUS 0x8000
  17. FILE_TOP1 0x10000 //hace
  18. FILE_ISTOP1 0x20000 //slowaction
  19. FH_MINUSDEL 0x40000 //add by mintbaggio for minus-postnums delte
  20. FH_MAILREPLY 0x80000 //add by macintosh for reply mail to author
board string 文章所属版面(英文)名
title string 文章标题
author string 文章作者 ID

否则仅包含错误码。

注意事项

Clone this wiki locally