paraworld.lobby.GetBBS

Description

取得某个频道的某个时间之后的所有消息

Parameters

Required Name Type Description
required sessionKey string 用户凭证。
channels string 频道名称,多个频道名称之间用“|”分隔
optional afterDate string 指定时间后的消息,如果为空,则不计
format int 返回的数据格式(0:XML 1:JSON),默认值为0

Example Return XML

<msg>
        <channels>
                <param index="1">
                        <channel type="string">public</channel>
                        <msgs>
                                <param index="1">
                                        <uid type="string">80683f75-e9ff-4145-bbf7-5448dcbc9196</uid>
                                        <date type="string">2008-12-25 14:21:19</date>
                                        <content type="string">48</content>
                                </param>
                                <param index="2">
                                        <uid type="string">80683f75-e9ff-4145-bbf7-5448dcbc9196</uid>
                                        <date type="string">2008-12-25 14:21:26</date>
                                        <content type="string">49</content>
                                </param>
                        </msgs>
                </param>
                <param index="2">
                        <channel type="string">aaaaaa</channel>
                        <msgs />
                </param>
        </channels>
</msg>

Example Return JSON

{"channels":[{"channel":"public","msgs":[{"uid":"80683f75-e9ff-4145-bbf7-5448dcbc9196","date":"2008-12-25 14:21:09","content":"45"},
{"uid":"80683f75-e9ff-4145-bbf7-5448dcbc9196","date":"2008-12-25 14:21:19","content":"48"},
{"uid":"80683f75-e9ff-4145-bbf7-5448dcbc9196","date":"2008-12-25 14:21:26","content":"49"}]},{"channel":"aaaaaa","msgs":[]}]}

Error Codes

当发生异常时,返回数据中会有一个“errorCode”节点,该节点记录了错误码。0:无异常 500:未知错误 499:提供的数据不完整 498:非法的访问 497:数据不存在或已被删除 496:未登录

查看完整的Error Code

Test Cases

case 1

Input:

{
        ["sessionKey"]="ed06733e-986d-4236-8fc8-9f8300456c21",
        ["afterDate"]="2008-1-1",
        ["channel"]="Channel_1",
}

Result:

{
        ["msgs"]={
                [1]={
                        ["date"]="2008-6-23 16:03:18",
                        ["uid"]="ed06733e-986d-4236-8fc8-9f8300456c21",
                        ["content"]="Hello 111",
                },
                [2]={
                        ["date"]="2008-6-23 16:06:40",
                        ["uid"]="ed06733e-986d-4236-8fc8-9f8300456c21",
                        ["content"]="Hello 222",
                },
        },
        ["channel"]="Channel_1",
}
Topic revision: r4 - 2009-01-12 - CaoYF
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback