paraworld.map.GetWorldByID

Description

依据ID取得一个World

Parameters

RequiredSorted ascending Name Type Description
optional format int 返回的数据格式(0:XML 1:JSON),默认值为0
required worldID string 要取得的World的ID

Example Return XML

<msg>
        <worldID type="double">9</worldID>
        <name type="string">test world</name>
        <desc type="string">this is a test world.</desc>
        <lastModifiedDate type="datetime">2008-6-4 18:05:01</lastModifiedDate>
        <lastVisitDate type="datetime">2008-6-5 14:10:49</lastVisitDate>
        <version type="string" />
        <approved type="boolean" />
        <ownerID type="string">6ea1ce24-bdf7-4893-a053-eb5fd2a74281</ownerID>
        <ownerUserName type="string">LiXizhi</ownerUserName>
        <spaceServer type="string" />
        <jabberGSL type="string" />
        <GSL type="string" />
        <gameServer type="string" />
        <visits type="double">1</visits>
        <ranking type="double">1</ranking>
        <ageGroup type="double">1</ageGroup>
        <gameData type="string" /></msg>

Example Return JSON

{"worldID":"1","name":"test1","desc":"testtesttest","lastModifiedDate":"2008-09-27T14:10:21.983","lastVisitDate":"2008-12-10T15:49:12.45",
"version":"1-1-1","approved":"false","ownerID":"9a557859-65c7-4636-8801-b0e7f8be3e21","ownerUserName":"ABC","spaceServer":"","jabberGSL":"",
"GSL":"","gameServer":"","visits":"11","ranking":"1","ageGroup":"4","gameData":"9a557859-65c7-4636-8801-b0e7f8be3e21","price":"-1"}

Error Codes

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

Test Cases

case 1

Input:

{

        ["worldID"]="3",

}

Result:

{

       ["gameData"]="",

       ["GSL"]="",

       ["ageGroup"]=1,

       ["ranking"]=1,

       ["jabberGSL"]="",

       ["version"]="",

       ["desc"]="this is a test world.",

       ["spaceServer"]="",

       ["gameServer"]="",

       ["name"]="test world",

       ["ownerID"]="6ea1ce24-bdf7-4893-a053-eb5fd2a74281",

       ["ownerUserName"]="LiXizhi",

       ["approved"]=true,

       ["worldID"]=3,

       ["visits"]=1,

}
Topic revision: r2 - 2008-12-10 - CaoYF
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 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