Shaun Mccran

My digital playground

01
J
U
N
2010

Xbox 360 Voice CFC released on RIAforge.org

Every time you turn on your Xbox 360 console and sign in with your Gamer profile your console records the data to an online server. www.360voice.com have written a service to consume the XML data.

360 Voice CFC http://360voice.riaforge.org is a Coldfusion based service layer that lets you consume the generated XML feeds from http://www.360voice.com.

You need a free account from www.360voice.com to setup your feeds. Once you have that you can call a variety of functions in the CFC (detailed below).

There is a full example of the following scripts running here: Demo. Below is a breakdown of the functions included, and how to invoke them.

getEntries

This function displays the feed of your 360 Voice account. This is the main 'Blog' function. It will display an ongoing blog of your Xbox 360 account. In all of the following examples you must substitute the 'userName' value with an actual Xbox 360 gamer tag name.

Arguments:
1. count – A count of how many entries to return (Numeric)
2. returnFormat – Return either html or XML content ('XML' or 'html')
3. username – username of the account to use (string)

The XML response can be called like this:

view plain print about
1<h2>Entries test (xml):</h2>
2<cfset getEntries.args['count'] = 5>
3<cfset getEntries.args['returnFormat'] = 'xml'>
4<cfset getEntries.args['userName'] = 'userName'>
5
6<cfset variables.getEntries = createObject('component','360').getEntries(argumentCollection = getEntries.args)>
7
8<cfdump var="#variables.getEntries#" label="Entries XML" expand="false">

To call it using the html response change your code slightly to this:

view plain print about
1<h2>Entries test (html):</h2>
2<cfset getEntries.args['count'] = 5>
3<cfset getEntries.args['returnFormat'] = 'html'>
4<cfset getEntries.args['userName'] = 'userName'>
5
6<cfset createObject('component','360').getEntries(argumentCollection = getEntries.args)>

The html returns content surrounded in div elements. The schema for the div elements is here:

view plain print about
1.xbox-header-container {float:left; width: 400px; border: 1px #000 solid;}
2
3.xbox-header {font-family: 'Arial'; width: 300px; border: 1px #000 solid; padding: 0px;}
4
5.xbox-date {float: left;}
6
7.xbox-gamer-icon {font-family: 'Arial'; float: right;}
8
9.xbox-entries-container {float: left;}
10
11.xbox-entries-header {font-family: 'Arial'; padding-top: 5px; font-weight: bold;}
12
13.xbox-entries-body {font-family: 'Arial'; padding-bottom: 10px;}

Each element is contained within its own div, so feel free to style as you see fit.

profile

Pass in a gamer tag to get profile and stat information. This provides an overview of the gamer tag being passed in.

Arguments:
username – username of the account to use (string)

view plain print about
1<cfset profile.args['userName'] = 'userName'>
2<cfset variables.myProfile = createObject('component','360').profile(argumentCollection = profile.args)>
3
4<cfdump var="#variables.myProfile#" label="Profile XML" expand="false">

vitals

Lists out the challenge statistics of a gamer tag.

Arguments:
username – username of the account to use (string)

view plain print about
1<cfset vitals.args['userName'] = 'userName'>
2
3<cfset variables.vitals = createObject('component','360').vitals(argumentCollection = vitals.args)>
4
5<cfdump var="#variables.vitals#" label="Vitals XML" expand="false">

badges

Pass in a gamertag and it will list out the badges that the user has. The 360 voice website will attach badges to your account. These are achievement markers to signify an accomplishment on your part.

Arguments:
username – username of the account to use (string)

view plain print about
1<cfset badges.args['userName'] = 'userName'>
2
3<cfset variables.badges = createObject('component','360').badges(argumentCollection = badges.args)>
4
5<cfdump var="#variables.badges#" label="Badges XML" expand="false">

There is a full example of the scripts running here: Demo

Conclusion

Any bugs or request can be made on the RIA forge site: http://360voice.riaforge.org.

Hope you enjoy.

Shaun

TweetBacks
Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Back to top