var request = require('request'),
    _ = require('underscore');

function init(config) {
  var baseUrl = 'http://api.steampowered.com/';
  var resources = [
    {method: 'getFriendList', interface: 'ISteamUser', version: 'v0001'},
    {method: 'getPlayerBans', interface: 'ISteamUser', version: 'v0001'},
    {method: 'getPlayerSummaries', interface: 'ISteamUser', version: 'v0002'},
    {method: 'getUserGroupList', interface: 'ISteamUser', version: 'v0001'},
    {method: 'resolveVanityURL', interface: 'ISteamUser', version: 'v0001'},
    {method: 'getRecentlyPlayedGames', interface: 'IPlayerService', version: 'v0001'},
    {method: 'getSteamLevel', interface: 'IPlayerService', version: 'v0001'},
    {method: 'getBadges', interface: 'IPlayerService', version: 'v0001'},
    {method: 'getCommunityBadgeProgress', interface: 'IPlayerService', version: 'v0001'},
    {method: 'isPlayingSharedGame', interface: 'IPlayerService', version: 'v0001'},
    {method: 'getOwnedGames', interface: 'IPlayerService', version: 'v0001'},
    {method: 'getAppList', interface: 'ISteamApps', version: 'v0001'},
    {method: 'upToDateCheck', interface: 'ISteamApps', version: 'v0001'},
    {method: 'getAppList', interface: 'ISteamApps', version: 'v0002'}
  ];

    return _.object(resources.map(function(resource) {
        return [resource.method, template.bind(undefined, config, baseUrl, resource)];
    }));
}
module.exports = init;

function template(config, baseUrl, property, callback, options) {

    options = options || {};
    var version = property.version || options.version;
    var qs = JSON.parse((JSON.stringify({key: config.apiKey}) + JSON.stringify(options.qs)).replace(/}{/g,","));

    request.get(baseUrl + property.interface + '/' + property.method + '/' + version + '/', {
      qs: qs
    }, function(err, res) {
      try {

        obj = JSON.parse(res.body);
        if(obj.error) return callback(obj.error);

        callback(err, obj, res);
      }
      catch(e) {
        callback(e, null, res);
      }
    });

}

@@ -165,17 +165,17 @@
 ethod: '
-g
+G
 etFriend
@@ -231,33 +231,33 @@
 ,%0A    %7Bmethod: '
-g
+G
 etPlayerBans', i
@@ -313,17 +313,17 @@
 ethod: '
-g
+G
 etPlayer
@@ -392,17 +392,17 @@
 ethod: '
-g
+G
 etUserGr
@@ -469,17 +469,17 @@
 ethod: '
-r
+R
 esolveVa
@@ -546,17 +546,17 @@
 ethod: '
-g
+G
 etRecent
@@ -633,17 +633,17 @@
 ethod: '
-g
+G
 etSteamL
@@ -711,17 +711,17 @@
 ethod: '
-g
+G
 etBadges
@@ -785,17 +785,17 @@
 ethod: '
-g
+G
 etCommun
@@ -875,17 +875,17 @@
 ethod: '
-i
+I
 sPlaying
@@ -959,17 +959,17 @@
 ethod: '
-g
+G
 etOwnedG
@@ -1029,33 +1029,33 @@
 ,%0A    %7Bmethod: '
-g
+G
 etAppList', inte
@@ -1108,17 +1108,17 @@
 ethod: '
-u
+U
 pToDateC
@@ -1182,17 +1182,17 @@
 ethod: '
-g
+G
 etAppLis

Revert "Converting to camelcase"