---+!! =paraworld.lobby.GetRoomList= <div style="float: right; margin: 5px; width: 250px; color: #4e5155; background-color: #f0eded; border: #ccc 1px solid; padding: 5px"> *Contents* %TOC% </div> ---++ Description 取得指定页的房间数据 ---++ Parameters |*Required*|*Name*|*Type*|*Description*| |<font color="#4682b4">optional</font>|pageIndex|%BLUE%string%ENDCOLOR%|以0开始的页码| |^|pageSize|%BLUE%int%ENDCOLOR%|每页的最大数据量| |^|worldID|%BLUE%int%ENDCOLOR%|取得与该World相关联的所有房间,若指定了worldID,将忽略worldPath| |^|worldPath|%BLUE%string%ENDCOLOR%|取得与该World相关联的所有房间| |^|orderField|%BLUE%int%ENDCOLOR%|排序字段。1:RoomID,2:CreateDate,3:ActivityDate, 默认值为2| |^|orderDirection|%BLUE%int%ENDCOLOR%|排序方式。1:正序;2:倒序,默认值为2| |^|format|%BLUE%int%ENDCOLOR%|返回的数据格式(0:XML 1:JSON),默认值为0| ---++ Example Return XML <verbatim> <msg> <pageCount type="double">1</pageCount> <rooms> <param index="1"> <roomID type="double">1</roomID> <worldID type="double">9</worldID> <worldPath type="string" /> <hostUID type="string">ed06733e-986d-4236-8fc8-9f8300456c21</hostUID> <joinPassword type="string">password</joinPassword> <description type="string">Description</description> <maxClients type="double">200</maxClients> <createDate type="string">2008-6-17 16:52:15</createDate> <activityDate type="string">2008-6-17 16:52:15</activityDate> </param> <param index="2"> <roomID type="double">2</roomID> <worldID type="double">9</worldID> <worldPath type="string" /> <hostUID type="string">ed06733e-986d-4236-8fc8-9f8300456c21</hostUID> <joinPassword type="string">password</joinPassword> <description type="string">This is a test room</description> <maxClients type="double">300</maxClients> <createDate type="string">2008-6-17 17:23:13</createDate> <activityDate type="string">2008-6-17 17:23:13</activityDate> </param> </rooms> </msg> </verbatim> ---++ Example Return JSON <verbatim> {"pageCount":"1","rooms":[{"roomID":"1747","worldID":"0","worldPath":"WorldPath","hostUID":"28275afd-670c-4d60-84ef-dc8f4e78ca87","joinPassword":"", "description":"This is a test room","maxClients":"100","createDate":"2008-12-10T11:28:14.7","activityDate":"2008-12-10T11:28:14.7"}]} </verbatim> ---++ Error Codes 当发生异常时,返回数据中会有一个“errorCode”节点,该节点记录了错误码。0:无异常 500:未知错误 499:提供的数据不完整 498:非法的访问 497:数据不存在或已被删除 496:未登录 查看完整的[[ErrorCodes][Error Code]] ---++ Test Cases ---+++!! case 1 Input: <verbatim> { ["pageIndex"]=0, ["orderDirection"]=1, ["pageSize"]=5, ["orderField"]=1, } </verbatim> _Result_: <verbatim> { ["pageCount"]=1, ["rooms"]={ [1]={ ["hostUID"]="ed06733e-986d-4236-8fc8-9f8300456c21", ["description"]="This is a test room", ["maxClients"]=300, ["roomID"]=1, ["activityDate"]="2008-6-17 17:25:35", ["createDate"]="2008-6-17 17:25:35", ["worldPath"]="", ["worldID"]=9, ["joinPassword"]="password", }, }, } </verbatim>
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r4 - 2008-12-10
-
CaoYF
Home
Site map
CCWeb web
HaqiTeen web
Main web
ParaEngine web
TWiki web
Main Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
导航页WebTopMenu
Preferences
开发指南
Getting Started
ParacraftSDK
NPL
MCML
NPL Reference Manual
美术Mod
Account
Log In
English
简体中文
簡體中文
E
dit
A
ttach
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback