paraworld.users.getInfo

Description

获取一组指定用户的指定信息

Parameters

Required Name Type Description
optional uids string 用逗号(,)分隔的多个用户ID,最多不可超过10个,uids与nids必须有一个参数有值,若两个都有值,忽略nids
nids string 用逗号(,)分隔的多个用户数字ID,最多不可超过10个
required fields string 要逗号(,)分隔的多个要取得的字段,若不传此参数,表示取得所有字段。可用的参数为:UserID,NID,UserName,FirstName,LastName,Nickname,MoneyP,MoneyE,Credits,Gender,BirthDate,RegisterArea,Grade,Photo,SmallPhoto,Email
optional format int 返回的数据格式(0:XML 1:JSON),默认值为0

Example Return XML

<msg xmlns="">
        <users>
                <param index="1">
                        <userID type="string">6ea1ce24-bdf7-4893-a053-eb5fd2a74281</userID>
                        <UserName type="string">testUser1</UserName>
                        <BirthDate type="string">1990-1-1 0:00:00</BirthDate>
                </param>
                <param index="2">
                        <userID type="string">a354ea8f-6ef6-4db7-ba6a-c6df2d47abb8</userID>
                        <UserName type="string">testUser2</UserName>
                        <BirthDate type="string">1980-1-1 0:00:00</BirthDate>
                </param>
        </users>
</msg>

Example Return JSON

{"users":[{"userID":"e03b3286-2e42-49d6-8a74-736223bfedca","UserName":"寮犲垰","Nickname":"","Gender":""}]}

Error Codes

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

Test Cases

case 1

Input:

{

        ["fields"]="UserName,BirthDate",

        ["uids"]="6ea1ce24-bdf7-4893-a053-eb5fd2a74281,a354ea8f-6ef6-4db7-ba6a-c6df2d47abb8",

}

Result:

{

        ["users"]={

                [1]={

                        ["UserName"]="testUser1",

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

                        ["BirthDate"]="1990-1-1 0:00:00",

                },

                [2]={

                        ["UserName"]="testUser2",

                        ["userID"]="a354ea8f-6ef6-4db7-ba6a-c6df2d47abb8",

                        ["BirthDate"]="1980-1-1 0:00:00",

                },

        },

}
Topic revision: r6 - 2008-12-24 - 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