6 <div id="brapi_calls_home_div">
7 <button class="btn btn-primary" id="brapi_home_show_calls">Show Calls</button>
13 jQuery(document).ready(function() {
15 jQuery("#brapi_home_show_calls").click(function() {
17 'url': jQuery('#brapi_home_url_select').val()+'/brapi/v1/calls?datatype=json&pageSize=100',
19 'success': function(response) {
20 console.log(response);
21 var html = '<br/><ul>';
22 for(var i = 0; i < response.result.data.length; i++) {
23 html = html+'<li>'+response.result.data[i].call+'</li>';
25 html = html+'<li>Datatypes:';
27 for(var j = 0; j < response.result.data[i].datatypes.length; j++){
28 html = html+'<li>'+response.result.data[i].datatypes[j]+'</li>';
31 html = html+'<li>Methods:';
33 for(var j = 0; j < response.result.data[i].methods.length; j++){
34 html = html+'<li>'+response.result.data[i].methods[j]+'</li>';
40 jQuery("#brapi_calls_home_div").empty().html(html);
42 error: function(response) {
43 alert('An error occurred getting calls');