Page 24 of 82 FirstFirst ... 14 22 23 24 25 26 34 74 ... LastLast
Results 231 to 240 of 814

Thread: Dota 2 Match History WebAPI

  1. #231
    Have there been some changes to how this api works in the past day or so? Before I was seeing about one new game per second show up when getting the match_history. Now it seems that there are only about 3 new matches per minute.

    e: Looks like I was just being dumb, problem solved.
    Last edited by DolefulStoat; 08-04-2012 at 02:26 AM.

  2. #232
    Basic Member
    Join Date
    Jun 2012
    Posts
    18

    Quick iOS app

    Hi everyone,

    I used the api to make a quick iOS app to just essentially show you your stats like you were looking at someone's profile. I still have some things to do with it, but feel free to take a look.

    Dota Stats

    Right now, it just searches by player name, so if you have a common player name, it won't disguish the results.

    Sinbu

  3. #233
    Basic Member
    Join Date
    Jan 2012
    Posts
    24
    To the devs,

    please check if barrack_status_dire and barrack_status_dire is getting correct values

    please create a GetItems service similar to the GetHeroes one

  4. #234
    Basic Member
    Join Date
    Aug 2012
    Posts
    2
    I seem to be getting low returns on matches lately. Seems like a new match is only showing up every 5 minutes or so. It also seems as if all of the new matches reported are matches that are abandons.

    Has the most recent update caused a bug somewhere in the system?

  5. #235
    Basic Member
    Join Date
    Nov 2011
    Posts
    2
    I PMed DolefulStoat and he wrote:
    Since this thursday it seems that new matches are being spread between all 500 matches returned in the list, rather than just being added to the first page.
    I tested this and saw that he's right.

  6. #236
    Basic Member
    Join Date
    Dec 2011
    Posts
    11
    Quote Originally Posted by Gaba View Post
    To the devs,

    please check if barrack_status_dire and barrack_status_dire is getting correct values

    please create a GetItems service similar to the GetHeroes one
    I noticed this too. barrack_status_dire seems to always have the same value as barrack_status_radiant. The radiant status is correct, but the dire status seems to be linked to the radiant status somewhere internally. Devs, please follow this up.

  7. #237
    Basic Member tomato's Avatar
    Join Date
    Jun 2012
    Posts
    10
    I found a lot of help in this thread, so here is a very lame way to draw towers on a map in return. It's not optimized at all, but it works. Maybe someone finds it useful:

    PHP Code:
    <?php
    $time_start 
    microtime(true);

    // pad the dec to 11bit binary
    $radiant_towers sprintf('%011b'$_GET["radiant"] ); 
    $dire_towers  sprintf('%011b'$_GET["dire"] );

    $canvas = @imagecreatefromgif("map.gif"); // load map into our canvas

    // Colors
    $red imagecolorallocate($canvas25500); // red for dire
    $green imagecolorallocate($canvas02550); // green for radiant

    // Radiant
    // Bot
    if ($radiant_towers[8]) { draw_tower($canvas115387$green); } // radiant bot t3 bot (rax)
    if ($radiant_towers[9]) { draw_tower($canvas214386$green); } // radiant bot t2 bot
    if ($radiant_towers[10]) { draw_tower($canvas360388$green); } // radiant bot t1 bot
    // Ancient
    if ($radiant_towers[0]) { draw_tower($canvas64353$green); } // radiant ancient 1
    if ($radiant_towers[1]) { draw_tower($canvas76363$green); } // radiant ancient 2
    // Top
    if ($radiant_towers[2]) { draw_tower($canvas38309$green); } // radiant t3 top (rax)
    if ($radiant_towers[3]) { draw_tower($canvas50245$green); } // radiant t2 top
    if ($radiant_towers[4]) { draw_tower($canvas50172$green); } // radiant t1 top
    // Mid
    if ($radiant_towers[5]) { draw_tower($canvas92333$green); } // radiant t3 mid (rax)
    if ($radiant_towers[6]) { draw_tower($canvas127299$green); } // radiant t2 mid
    if ($radiant_towers[7]) { draw_tower($canvas181261$green); } // radiant t1 mid


    // Dire
    // Bot 
    if ($dire_towers[8]) { draw_tower($canvas398141$red); } // dire t3 (rax) bot
    if ($dire_towers[9]) { draw_tower($canvas396215$red); } // dire t2 bot
    if ($dire_towers[10]) { draw_tower($canvas394272$red); } // dire t1 bot
    // Ancient
    if ($dire_towers[0]) { draw_tower($canvas35984$red); } // dire ancient 1
    if ($dire_towers[1]) { draw_tower($canvas37296$red); } // dire ancient 2
    // Top
    if ($dire_towers[2]) { draw_tower($canvas32362$red); } // dire t3 (rax) top
    if ($dire_towers[3]) { draw_tower($canvas21850$red); } // dire t2 top
    if ($dire_towers[4]) { draw_tower($canvas8555$red); } // dire t1 top
    // Mid
    if ($dire_towers[5]) { draw_tower($canvas338118$red); } // dire t3 (rax) mid
    if ($dire_towers[6]) { draw_tower($canvas287161$red); } // dire t2 mid
    if ($dire_towers[7]) { draw_tower($canvas249212$red); } // dire t1 mid

    // Debug
    $time_end microtime(true);
    $time $time_end $time_start;
    imagestring($canvas510410"debug: " $time "| $dire_towers | $radiant_towers"$red);

    // Output stuff
    header('Content-Type: image/png');
    imagepng($canvas);
    imagedestroy($canvas);

    // Helper function to draw a 10x10 pixel "tower"
    function draw_tower($canvas$x$y$color){
        
    imagefilledrectangle($canvas$x$y$x+10$y+10$color);
    }

    ?>
    You can see what the estimated output looks like by clicking the "Tower Statistics" tab on my test project: http://oldmanclub.org/dev/dota/index.php?id=30249270

  8. #238
    Basic Member adrianlegg's Avatar
    Join Date
    Mar 2012
    Posts
    568
    @Zoid
    Where can we fetch team logo?

    Having this from data:
    "radiant_logo": 938122284711231033,

    I saw calls to:
    http://cloud.steampowered.com/ugc/93...xxxxxxxxxxxxx/
    but I have no clue how to figure out those 'x's to make valid call.
    You gotta FIGHT!
    For Your RIGHT!
    To BUUUGFIX!

  9. #239
    Basic Member
    Join Date
    Feb 2012
    Posts
    14
    Quote Originally Posted by tomato View Post
    I found a lot of help in this thread, so here is a very lame way to draw towers on a map in return. It's not optimized at all, but it works. Maybe someone finds it useful:

    PHP Code:
    <?php
    $time_start 
    microtime(true);

    // pad the dec to 11bit binary
    $radiant_towers sprintf('%011b'$_GET["radiant"] ); 
    $dire_towers  sprintf('%011b'$_GET["dire"] );

    $canvas = @imagecreatefromgif("map.gif"); // load map into our canvas

    // Colors
    $red imagecolorallocate($canvas25500); // red for dire
    $green imagecolorallocate($canvas02550); // green for radiant

    // Radiant
    // Bot
    if ($radiant_towers[8]) { draw_tower($canvas115387$green); } // radiant bot t3 bot (rax)
    if ($radiant_towers[9]) { draw_tower($canvas214386$green); } // radiant bot t2 bot
    if ($radiant_towers[10]) { draw_tower($canvas360388$green); } // radiant bot t1 bot
    // Ancient
    if ($radiant_towers[0]) { draw_tower($canvas64353$green); } // radiant ancient 1
    if ($radiant_towers[1]) { draw_tower($canvas76363$green); } // radiant ancient 2
    // Top
    if ($radiant_towers[2]) { draw_tower($canvas38309$green); } // radiant t3 top (rax)
    if ($radiant_towers[3]) { draw_tower($canvas50245$green); } // radiant t2 top
    if ($radiant_towers[4]) { draw_tower($canvas50172$green); } // radiant t1 top
    // Mid
    if ($radiant_towers[5]) { draw_tower($canvas92333$green); } // radiant t3 mid (rax)
    if ($radiant_towers[6]) { draw_tower($canvas127299$green); } // radiant t2 mid
    if ($radiant_towers[7]) { draw_tower($canvas181261$green); } // radiant t1 mid


    // Dire
    // Bot 
    if ($dire_towers[8]) { draw_tower($canvas398141$red); } // dire t3 (rax) bot
    if ($dire_towers[9]) { draw_tower($canvas396215$red); } // dire t2 bot
    if ($dire_towers[10]) { draw_tower($canvas394272$red); } // dire t1 bot
    // Ancient
    if ($dire_towers[0]) { draw_tower($canvas35984$red); } // dire ancient 1
    if ($dire_towers[1]) { draw_tower($canvas37296$red); } // dire ancient 2
    // Top
    if ($dire_towers[2]) { draw_tower($canvas32362$red); } // dire t3 (rax) top
    if ($dire_towers[3]) { draw_tower($canvas21850$red); } // dire t2 top
    if ($dire_towers[4]) { draw_tower($canvas8555$red); } // dire t1 top
    // Mid
    if ($dire_towers[5]) { draw_tower($canvas338118$red); } // dire t3 (rax) mid
    if ($dire_towers[6]) { draw_tower($canvas287161$red); } // dire t2 mid
    if ($dire_towers[7]) { draw_tower($canvas249212$red); } // dire t1 mid

    // Debug
    $time_end microtime(true);
    $time $time_end $time_start;
    imagestring($canvas510410"debug: " $time "| $dire_towers | $radiant_towers"$red);

    // Output stuff
    header('Content-Type: image/png');
    imagepng($canvas);
    imagedestroy($canvas);

    // Helper function to draw a 10x10 pixel "tower"
    function draw_tower($canvas$x$y$color){
        
    imagefilledrectangle($canvas$x$y$x+10$y+10$color);
    }

    ?>
    You can see what the estimated output looks like by clicking the "Tower Statistics" tab on my test project: http://oldmanclub.org/dev/dota/index.php?id=30249270
    I did the exact same thing xD
    http://megapotion.com.br/dota2/match...ch_id=30616543

  10. #240
    Basic Member tomato's Avatar
    Join Date
    Jun 2012
    Posts
    10
    Quote Originally Posted by IceHaku View Post
    I like your version more. It would also consume much less resources than my GD version. Where did you find the little tower images? I prefer them over my lame color ones!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •