The XboxMB API has been completely recoded. There aren't many visible changes, but be sure to read this entire thread regardless.
The API can be accessed at
api.xboxmb.com.
The function of the API is to output specific data pertaining to a XboxMB user. This data can be used by developers to create applications that integrate with XboxMB indirectly.
Without specifying any parameters, the API will output YOUR user data in JSON based off of your IP address. Using parameters, you can look-up a user by username or by user ID. Reverse look-ups can be performed on gamertags and Minecraft usernames.
Parameters:- u - Username
- uid - User ID
- gt - Gamertag
- mc - Minecraft Username
- xml=1 - Output data in XML format
- yaml=1 - Output data in YAML format
Data Values: Valid
Type: Boolean
Description: Will be true if the user is found, otherwise false.
UserID
Type: UInt32
Description: The unique ID number of the user.
Username
Type: String
Description: The user's username.
JoinDate
Type: UInt32
Description: The registration date of the user in Unix/epoch time.
UserGroup
Type: UInt32
Description: The usergroup that the user is in.
Usergroup mapping:
PHP Code:
2 => 'Normal Member'
3 => 'Normal Member' // Awaiting email confirmation
5 => 'Super Moderator'
6 => 'Developer'
7 => 'Moderator'
8 => 'Banned'
10 => 'Beta Tester'
11 => 'Diamond Member'
12 => 'Owner'
14 => 'Administrator'
17 => 'Veteran Moderator'
19 => 'Partner'
24 => 'Horizon Pro'
25 => 'Design Team'
The title for group 3 has been changed from 'Member' to 'Normal Member'. Title
Type: String
Description: The title of the usergroup. See the list above.
Staff
Type: Boolean
Description: True if the user is a staff member.
Diamond
Type: Boolean
Description: True if the user is a Diamond member.
Banned
Type: Boolean
Description: True if the user is banned.
Posts
Type: UInt32
Description: The number of posts the user has made on the forum.
Thanks
Type: UInt32
Description: The number of thanks that user has received.
TimeZone
Type: SByte
Description: The timezone offset of the user.
Gamertag
Type: String
Description: The user's gamertag. This can be edited by the user in the User CP.
Minecraft
Type: String
Description: The user's Minecraft username. This can only be set by the
XboxMB Minecraft server.
Examples:
User data for Cheater912 outputted in JSON by deafult:
http://api.xboxmb.com/?u=cheater912 PHP Code:
{
"Valid":true,
"UserID":14,
"Username":"Cheater912",
"UserGroup":6,
"Title":"Developer",
"Staff":true,
"Diamond":true,
"Banned":false,
"Posts":5234,
"Thanks":10221,
"TimeZone":-5,
"Gamertag":"Cheater912",
"Minecraft":"Cheater912",
"JoinDate":1278981240
}
User data for Nookie outputted in XML:
Administrator PHP Code:
<?xml version="1.0" encoding="UTF-8"?>
<XboxMB>
<Valid>1</Valid>
<UserID>7</UserID>
<Username>Nookie</Username>
<UserGroup>14</UserGroup>
<Title>Administrator</Title>
<Staff>1</Staff>
<Diamond>1</Diamond>
<Banned/>
<Posts>2589</Posts>
<Thanks>2220</Thanks>
<TimeZone>10</TimeZone>
<Gamertag>XMB Nookie</Gamertag>
<Minecraft/>
<JoinDate>1278925200</JoinDate>
</XboxMB>
Reverse look-up of the Minecraft username "sgtfrankieboy" outputted in YAML:
http://api.xboxmb.com/?mc=sgtfrankieboy&yaml=1 PHP Code:
---
Valid: true
UserID: 18518
Username: sgt frankieboy
UserGroup: 2
Title: Normal Member
Staff: false
Diamond: false
Banned: false
Posts: 971
Thanks: 455
TimeZone: 1
Gamertag: sgt frankieboy
Minecraft: sgtfrankieboy
JoinDate: 1288972674
...
Make something epic with this!