var SPNAPI = (function(SPNAPI, $, undefined) { SPNAPI.methods.iguana = [ {"id":1,"method":"wallet","base":"base","maxplayers":"maxplayers","bigblind":"bigblind","ante":"ante"}, {"id":2,"method":"status","tableid":"tableid"} ]; SPNAPI.methods.Wallet = [ {"id":1,"method":"wallet","base":"base","maxplayers":"maxplayers","bigblind":"bigblind","ante":"ante"}, {"id":2,"method":"status","tableid":"tableid"} ]; SPNAPI.loadApiBox = function (agent,methods) { methods = methods[0]; $(".api-panel-title").html(methods.method); var json = { "agent" : agent, "method" : methods.method }; var rows = ''; rows += ''; rows += ''; rows += '' + '' + '' + ''; $.each(methods, function (index, value) { if(index !== "id") { if( index !== "method") { var required = ''; if(value > '') { required = 'has-success'; } rows += ''; json[index] = value; } } }); rows += '
Agent'+agent+'
Method'+methods.method+'
' + index + '

'; json = JSON.stringify(json); $(".json_submit_url").html(json); $(".api_formfill").html(rows); }; return SPNAPI; }(SPNAPI || {}, jQuery));