Home - Editor
 

Defense of the Ancients Guides API

General info.

JSONView is a nice add-on for Firefox to view the JSON responses mentioned in the following sections.

DOTA core data.

Use heroes.php to get a JSON formatted response of the DOTA heroes.

Use items.php to get a JSON formatted response of the DOTA items."

Use guides.php to get a JSON formatted response of the DOTA guides."

JSON-P

The data services mentioned above are jsonp compatible, just append a ?callback=[your-callback-name]. For example:

Use heroes.php?callback=yourcallbackname to get a JSON-P formatted response of the DOTA heroes.

JQUERY JSON-P Ajax Call Example

$(document).ready(function (){
    $.get("heroes.php", {}, function(data){
        $('#heroes').html(data.length);
    }, 'jsonp');
});