node-uxla

Node.js module that wrap xboxleaders.com and xboxapi.com api

npm install node-uxla
10 downloads in the last week
14 downloads in the last month

node-uxla

NPM

NPM

Description

A node.js module that wrap xboxleaders.com and xboxapi.com api.

Install

$ npm install node-uxla

Usage

Include module

  • Entire module
var uxla = require('node-uxla');
  • One of the available classes
var XboxLeaders = require('node-uxla').XboxLeaders;
var xlDefault = new XboxLeaders();
var xlConfigured = new XboxLeaders({
    "version": "2.0",
    "format": "json"
});

// or

var XboxApi = require('node-uxla').XboxApi;
var xaDefault = new XboxApi();
var xaConfigured = new XboxApi({
    "version": "v1",
    "format": "json"
});

Use module

// XboxApi
xa.profile(gamertag, function(err, data){ ... });
xa.games(gamertag, function(err, data){ ... });
xa.friends(gamertag, function(err, data){ ... });
xa.achievements(gamertag, gameid, function(err, data){ ... });
xa.catalog(gameid, function(err, data){ ... });

// XboxLeaders
xl.profile(gamertag, function(err, data){ ... });
xl.games(gamertag, function(err, data){ ... });
xl.friends(gamertag, function(err, data){ ... });
xl.achievements(gamertag, gameid, function(err, data){ ... });
xl.search(query, function(err, data){ ... });

Common methods

Method Description Required parameters Optional parameters Response format
profile Returns information about the requested gamertag that would be displayed on their Xbox.com profile. gamertag region (only for XboxLeaders) JSON, XML (mostly used)
games Returns a list of all the games the requested gamertag has played, as well as data pertaining to those games, such as achievements, gamerscore and boxart. gamertag region (only for XboxLeaders) JSON, XML (mostly used)
friends Returns a list of all of the requested gamertag's friends as well as their online status. gamertag region (only for XboxLeaders) JSON, XML (mostly used)
achievements Returns a list of all achievements for the requested gamertag and game. Secret achievements cannot be revealed through this endpoint. gamertag, gameid region (only for XboxLeaders) JSON, XML (mostly used)

XboxLeaders methods

Method Description Required parameters Optional parameters Response format
search Return a list of results for the queried search. Searches the Xbox Marketplace. query region JSON, XML (mostly used)

XboxApi methods

Method Description Required parameters Optional parameters Response format
catalog Return some information about a particular game. Information such as genre, description, lots of images. gameid JSON, XML (mostly used)

Tests

You will find 2 scripts in the scripts folder at root project to test the supported API.

$ npm run-script xbox-api

// or

$ npm run-script xbox-leaders

License

The MIT License (MIT)

Copyright (c) 2013 Ismael Gorissen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

npm loves you