Download Horizon :: Staff Members :: TheTechGame.com :: XboxMB YouTube


Old 12-13-2011   #1 (permalink)
Cheater912's Avatar
:D
Join Date: Jul 2010
Location: New York
Posts: 5,683
Thanks: 12,223
Computer The XboxMB API [JSON/XML/YAML]

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:
=> 'Normal Member'
=> 'Normal Member' // Awaiting email confirmation
=> 'Super Moderator'
=> 'Developer'
=> 'Moderator'
=> '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:
---
Validtrue
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!
__________________
Cheater912 is offline Send a message via Skype™ to Cheater912
Reply With Quote


Old 12-13-2011   #2 (permalink)
TroPPicZ xBoX's Avatar
Join Date: Sep 2010
Location: UK
Posts: 1,051
Thanks: 422
Default Re: API Update

Nice. This should be good to screw around with.
__________________
TroPPicZ xBoX is online now
Reply With Quote


Old 12-13-2011   #3 (permalink)
PokeR's Avatar
Abandon All Ships <3
Join Date: Sep 2010
Location:
Posts: 460
Thanks: 277
Default Re: API Update

Probably stupid and useless question but
How is the join date meant to be read

JoinDate: 1285423644 << i don't get it
PokeR is online now
Reply With Quote


Old 12-13-2011   #4 (permalink)
Speak's Avatar
http://t.co/vA9CtdSI
Join Date: Sep 2010
Location: New Jerseyyy
Posts: 6,231
Thanks: 2,115
Default Re: API Update

Owner?
Is that the account the forum was created with?
__________________

Looking for a iOS dev. I have the idea, just need the coder.

#revoltagainstdrake


Speak is offline Send a message via AIM to Speak
Reply With Quote


Old 12-13-2011   #5 (permalink)
XMB Pavman's Avatar
Pavman
Join Date: May 2011
Location: United States
Posts: 3,350
Thanks: 2,652
Lightning Re: API Update

Quote:
Originally Posted by PokeR View Post
Probably stupid and useless question but
How is the join date meant to be read

JoinDate: 1285423644 << i don't get it
You probably edited your stuff wrong.

Go here, and then edit your name where cheater912 is,

http://api.xboxmb.com/?u=cheater912&yaml=1

So like my link would be,

http://api.xboxmb.com/?u=xmb%20pavman&yaml=1

And then yours would be,

http://api.xboxmb.com/?u=PokeR&yaml=1

Than when you click that, you will see this,

Code:
--- Valid: true UserID: 91391 Username: XMB Pavman UserGroup: 11 Title: Diamond Member Staff: false Diamond: true Banned: false Posts: 1721 Thanks: 942 TimeZone: -5 Gamertag: Pavman Minecraft: pavman23 JoinDate: 1305347460 ...
I think the 'JoinDate:' thing is messed up, but the 'UserID; is really how you tell when you join.

But, maybe that is just the YAML example.

Nice, i'm liking it.
__________________
XMB Pavman is offline Send a message via AIM to XMB Pavman Send a message via Skype™ to XMB Pavman
Reply With Quote
The following users thanked this post: gowlegend100k, PokeR, Supporter




Old 12-13-2011   #6 (permalink)
Cheater912's Avatar
:D
Join Date: Jul 2010
Location: New York
Posts: 5,683
Thanks: 12,223
Default Re: The XboxMB API

The join date is a unix timestamp. It's the number of seconds since January 1, 1970.
__________________
Cheater912 is offline Send a message via Skype™ to Cheater912
Reply With Quote
The following users thanked this post: AHA38, Austin, Jeremy Q, Jimmy, PokeR, sgt frankieboy, Stickle, Supporter


Old 12-13-2011   #7 (permalink)
Regular Member
sgt frankieboy's Avatar
Join Date: Nov 2010
Location: Netherlands
Posts: 2,391
Thanks: 1,738
Default Re: The XboxMB API [JSON/XML/YAML]

Going to re code my PHP Class for it too.
Also going to make a .NET DLL for it.

You used my minecraft name
__________________


Minecraft World Editor - [BETA] YTMP
Programming Resources

Quote:
Originally Posted by Rich Cook
Programming today is a race between software engineers striving to build bigger and better
idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far, the Universe is winning.

Last edited by sgt frankieboy; 12-13-2011 at 06:46 AM.
sgt frankieboy is online now Send a message via ICQ to sgt frankieboy Send a message via AIM to sgt frankieboy Send a message via MSN to sgt frankieboy Send a message via Yahoo to sgt frankieboy Send a message via Skype™ to sgt frankieboy
Reply With Quote


Old 12-13-2011   #8 (permalink)
Cheater912's Avatar
:D
Join Date: Jul 2010
Location: New York
Posts: 5,683
Thanks: 12,223
Default Re: The XboxMB API [JSON/XML/YAML]

Quote:
Originally Posted by sgt frankieboy View Post
Going to re code my PHP Class for it too.
Also going to make a .NET DLL for it.

You used my minecraft name
I just coded a PHP class

I'm going to post it later. Try to make yours more efficient.
__________________
Cheater912 is offline Send a message via Skype™ to Cheater912
Reply With Quote
The following users thanked this post: sgt frankieboy, Supporter


Old 12-13-2011   #9 (permalink)
Regular Member
sgt frankieboy's Avatar
Join Date: Nov 2010
Location: Netherlands
Posts: 2,391
Thanks: 1,738
Default Re: The XboxMB API [JSON/XML/YAML]

Quote:
Originally Posted by Cheater912 View Post
I just coded a PHP class

I'm going to post it later. Try to make yours more efficient.
I will make the .NET Class then
__________________


Minecraft World Editor - [BETA] YTMP
Programming Resources

Quote:
Originally Posted by Rich Cook
Programming today is a race between software engineers striving to build bigger and better
idiot-proof programs, and the Universe trying to produce bigger and better idiots.
So far, the Universe is winning.
sgt frankieboy is online now Send a message via ICQ to sgt frankieboy Send a message via AIM to sgt frankieboy Send a message via MSN to sgt frankieboy Send a message via Yahoo to sgt frankieboy Send a message via Skype™ to sgt frankieboy
Reply With Quote


Old 12-13-2011   #10 (permalink)
Chuck Testa's Avatar
Totally Trav
Join Date: Sep 2010
Posts: 5,199
Thanks: 3,845
Default Re: The XboxMB API [JSON/XML/YAML]

Cheater, you ruined the contest engine
__________________
______________________
__________________________
______________________________
__________________________________

4-15-10

__________________________________
______________________________
__________________________
______________________

__________________
Chuck Testa is offline Send a message via AIM to Chuck Testa Send a message via Skype™ to Chuck Testa
Reply With Quote
The following user thanked this post: Jeremy Q

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 09:18 AM.


 

Powered by vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
COPYRIGHT (c) 2010 - 2012 - XboxMB - DESIGN BY:
EDENWEBS.COM