Announcement

Collapse

Forum Rules

  • No flaming or derogatory remarks, directly or through insinuation.
  • No discussion, sharing or referencing illegal software such as hacks, keygen, cracks and pirated software.
  • No offensive contents, including but not limited to, racism, gore or pornography.
  • No excessive spam/meme, i.e. copious one liners in a short period of time, typing with all caps or posting meme responses (text/image).
  • No trolling, including but not limited to, flame incitation, user provocation or false information distribution.
  • No link spamming or signature advertisements for content not specific to Dota 2.
  • No Dota 2 key requests, sell, trade etc.
  • You may not create multiple accounts for any purpose, including ban evasion, unless expressly permitted by a moderator.

  • Please search before posting. One thread per issue. Do not create another thread if there is an existing one already.
  • Before posting anything, make sure you check out all sticky threads (e.g., this). Do not create new threads about closed ones.
  • It is extremely important that you post in correct forum section.

  • Balance discussion only in Misc.
  • All art related (such as hero model) feedbacks go to Art Feedback Forum.
  • All matchmaking feedback should go here: Matchmaking Feedback
  • All report/low priority issues should go here: Commend/Report/Ban Feedback
  • No specific workshop item feedback. These should go to workshop page of that item.
  • When posting in non-bugs section (such as this), use [Bugs], [Discussion] or [Suggestion] prefix in your thread name.



In case you object some action by a moderator, please contact him directly through PM and explain your concerns politely. If you are still unable to resolve the issue, contact an administrator. Do not drag these issues in public.



All rules are meant to augment common sense, please use them when not conflicted with aforementioned policies.
See more
See less

Dota 2 Match History WebAPI

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    is there a limit on how many api calls we can do ?
    also, any idea when an api for live matches will be released ? Like the one in the past IT used to display live in-game stats of each player.
    Last edited by wololo; 07-18-2012, 08:17 PM.

    Comment


    • #17
      awesome ...
      sorry for my bad English ...

      From Vietnam with Love - Lagest DOTA 2 Community in Vietnam: DotA-2.Vn

      Comment


      • #18
        Originally posted by Tharuler View Post
        I use a different method to get matches, but will most likely switch to this one
        When/if you switch over, can you explain how you did it before? I'm curious to know but can't figure it out.

        Comment


        • #19
          Zoid, do you have any idea if this will be source-engine wide? Will CS:Go have a similar API available, or is it completely specific to the game?

          This is awesome, though. Thanks so much!

          Comment


          • #20
            Thanks.
            But how to return other language data?

            Comment


            • #21
              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>

              Comment


              • #22
                I miss an option for whether stats get recorded or not...

                Comment


                • #23
                  Holy cow, i didnt understand a word on this topic.
                  Maverick Hunter.

                  Comment


                  • #24
                    Btw, is it possible to get list of dota2 items ids with titles of items?
                    dotavideo.ru developer

                    Comment


                    • #25
                      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/

                      Comment


                      • #26
                        How does the tower status work? Do you turn the number into binary, and each digit corresponds if a tower is up or down?

                        Comment


                        • #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?

                          Comment


                          • #28
                            awe-some.
                            i have an idea for a great tool. watch the android-market guys.

                            Comment


                            • #29
                              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

                              Comment


                              • #30
                                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, 11:47 PM.

                                Comment

                                Working...
                                X