Page 3 of 82 FirstFirst 1 2 3 4 5 13 53 ... LastLast
Results 21 to 30 of 814

Thread: Dota 2 Match History WebAPI

  1. #21
    Basic Member
    Join Date
    Jul 2012
    Location
    USA
    Posts
    28
    Quote Originally Posted by Tharuler View Post
    To download a replay:

    "http://replay" + match.cluster + ".valve.net/570/" + match.match_id + "_" + match.replay_salt + ".dem.bz2?v=1"
    It bears noting that all the information you'll need to fill in the above values can be obtained by querying "GetMatchDetails" for a given match ID

    https://api.steampowered.com/IDOTA2Match_205790/GetMatchDetails/V001/?format=xml&match_id=691926&key=<key>

  2. #22
    Banned
    Join Date
    Sep 2011
    Posts
    12,296
    I miss an option for whether stats get recorded or not...

  3. #23
    Basic Member DarkSuo's Avatar
    Join Date
    Oct 2011
    Location
    BRASIL
    Posts
    502
    Holy cow, i didnt understand a word on this topic.
    Maverick Hunter.

  4. #24
    Basic Member
    Join Date
    Jul 2012
    Posts
    6
    Btw, is it possible to get list of dota2 items ids with titles of items?
    dotavideo.ru developer

  5. #25
    Basic Member
    Join Date
    Jul 2012
    Location
    USA
    Posts
    28
    Quote Originally Posted by XAOPT View Post
    Btw, is it possible to get list of dota2 items ids with titles of items?
    That's been possible for some time, I believe.

    Try this link: http://dota.tf2ls.com/

  6. #26
    Basic Member Drkirby's Avatar
    Join Date
    Nov 2011
    Posts
    894
    How does the tower status work? Do you turn the number into binary, and each digit corresponds if a tower is up or down?

  7. #27
    I'm trying to get the latest matches for a particular user right now and it doesn't return anything. I'm trying the playername and the account_id where I'm not sure what is exactly meant with that:

    Code:
    account_id=<id> # Steam account id (this is not SteamID, its only the account number portion)
    My account ids are: 76561197962139039, STEAM_0:1:936655
    I tried with both and the 936655 part even but it returns an empty result.
    When trying to query with the playername (i suppose I need to urlencode the playername, otherwise this wouldn't make sense) but then again, no results.

    PHP Code:
    <?php



    $scheme 
    "https://api.steampowered.com/IDOTA2Match_%s/%s/V001/?format=%s&key=%s&player_name=%s&hero_id=%s&skill=%d&date_min=%s&date_max=%s&account_id=%s&league_id=%d&start_at_match_id=%d&matches_requested=%d";
    $appID 205790;
    $method "GetMatchHistory";
    $format "XML";
    $apikey "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
    $playername urlencode("");
    $heroid "";
    $skill 0;
    $date_min "";
    $date_max "";
    $account_id "936655";
    $league_id "";
    $start_at_match_id 0;
    $matches_requested 25;

    $query sprintf($scheme,
        
    $appID$method$format$apikey$playername$heroid$skill$date_min$date_max$account_id$league_id$start_at_match_id$matches_requested);

        
    // Needs curl to actually be able to pull data from steam api because of the special response-behaviour.
        
    $ch curl_init();
        
    curl_setopt$chCURLOPT_URL$query );
        @
    curl_setopt$chCURLOPT_FOLLOWLOCATIONtrue );
        
    curl_setopt$chCURLOPT_RETURNTRANSFERtrue );
        
    curl_setopt$chCURLOPT_AUTOREFERERtrue );
        
    curl_setopt$chCURLOPT_SSL_VERIFYPEERfalse );
        
    curl_setopt$chCURLOPT_MAXREDIRS);
        
    curl_setopt$chCURLOPT_CONNECTTIMEOUT10 ); #rc1: helps with page delay if steam is down
        
    $raw_response curl_exec$ch );
        
    $http_response_header curl_getinfo$ch );
        
    $curl_errno curl_errno($ch);
        
    $curl_error curl_error($ch);
        
    curl_close($ch);
        
        
    var_dump($http_response_header);
        
    var_dump($raw_response);
        
        
        

    ?>
    any help?

  8. #28
    Basic Member
    Join Date
    Dec 2011
    Posts
    11
    awe-some.
    i have an idea for a great tool. watch the android-market guys.

  9. #29
    Banned
    Join Date
    Nov 2011
    Posts
    543
    Quote Originally Posted by Tharuler View Post
    I use a different method to get matches, but will most likely switch to this one
    I hope you will include skill level. Would be cool

  10. #30
    Basic Member
    Join Date
    Jul 2012
    Location
    USA
    Posts
    28
    Quote Originally Posted by radonthetyrant View Post
    I'm trying to get the latest matches for a particular user right now and it doesn't return anything. I'm trying the playername and the account_id where I'm not sure what is exactly meant with that:

    Code:
    account_id=<id> # Steam account id (this is not SteamID, its only the account number portion)
    My account ids are: 76561197962139039, STEAM_0:1:936655
    I tried with both and the 936655 part even but it returns an empty result.
    When trying to query with the playername (i suppose I need to urlencode the playername, otherwise this wouldn't make sense) but then again, no results.

    PHP Code:
    snip 
    any help?

    I just played around with this and there's probably an easier way, but this seems to work for me:

    Append ?xml=1 to the end of your SteamCommunity profile. Here's mine for example:

    http://steamcommunity.com/id/AdmiralRychard/?xml=1

    Look for the <steamID64> element (it should be at the very top). That's a 64-bit integer representation of your SteamID. Not very useful in it's current form though, so I took a trip to the Valve developer wiki page for more insight.

    Here's the link to that: https://developer.valvesoftware.com/wiki/SteamID

    About halfway down the page I found this little snippet of information (I've bolded the important part):
    When represented internally in computer programs the X, Y and Z components (see the section titled 'As Represented Textually') are all packed into a 64-bit data structure.
    The low 32 bits represents the ID number for the account (the "account number").
    The next 20 bits represents the instance of the account. It is usually set to 1 for user accounts.
    The next 4 bits represents the type of account.
    The next 8 bits represents the "Universe" the steam account belongs to.
    I took my SteamID I got earlier and converted it to a binary string.
    This website worked for me: http://www.tonymarston.net/php-mysql/converter.php

    Once you've got your binary string representation of your SteamID, start from the right-most side of the string (remember, the wiki said the account ID is the lowest 32 bits), and count 32 characters to the left.

    Copy only those 32 characters and convert them back into a decimal value.

    The resulting integer value should be your account ID. Mine is 3471017, by the way.

    Hope this helps!

    Edit: Is yours 1873311, by any chance? http://stats.dota2.be/player/1873311
    Last edited by Rychard; 07-18-2012 at 11:47 PM.

Posting Permissions

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