| Version 7 (modified by pangchongyang, 15 years ago) (diff) |
|---|
获取指定 forum 主题列表
| URL | http://mrobot.pcauto.com.cn/proxy/bbs/forums/$forum_ID |
| Method | GET |
Params
| name | required | value | desc |
| pageSize | n | unsigned | 每页有多少个帖子 |
| pageNo | n | unsigned | 第几页 |
| filter | n | pick | 精华贴 |
Note
HTTP/1.1 200 OK Server: nginx/0.8.42 Date: Wed, 04 May 2011 10:19:44 GMT Content-Type: text/html; charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive X-Page: 1,91
| X-Page | 当前第几页,共有多少个帖子 |
客户端分页时,必须要作如下设置
PAGINATION_SIZE 10 # 每页里面有多少个 posts
splits = X-Page.split(",")
current_page_num = splits[0]
total_posts = splits[1]
total_page = total_posts / PAGINATION_SIZE; # 一共有多少页
Examples
curl http://mrobot.pcauto.com.cn/proxy/bbs/forums/16300 curl http://mrobot.pcauto.com.cn/proxy/bbs/forums/16300?pageSize=10&pageNo=2 curl http://mrobot.pcauto.com.cn/proxy/bbs/forums/16300?filter=pick
![(please configure the [header_logo] section in trac.ini)](http://www1.pconline.com.cn/hr/2009/global/images/logo.gif)