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

  • Would it be possible to add another argument to the API call for filtering by lobby_type? It's annoying to get bot matches when I'm looking for pvp games only.
    Steam Profile
    Python Interface to the Stats API
    Suggestion: Courier Shift-Queue Improvements
    Make Disablehelp work on Decrepify
    Useful link for mute system supporters

    Comment


    • Originally posted by MuppetMaster42 View Post
      you have to have the gmp extenison installed (usually just need to uncomment php_gmp.dll in your php.ini)
      i called support guy on server and he didnt answered, so i used solution i found on stackoverflow.com
      PHP Code:
      $steam_id $steam_id 0xffffffff
      EDIT: its pity this is destructive method and cannot get 64bit(only 32) but what the hell.. it's still better than nothing
      Last edited by Smrth; 08-10-2012, 12:14 AM.

      Comment


      • Originally posted by Smrth View Post
        i called support guy on server and he didnt answered, so i used solution i found on stackoverflow.com
        PHP Code:
        $steam_id $steam_id 0xffffffff
        that works in 32-bit PHP? I didn't think it would considering it steam_id is 64-bit...
        cool then, that'd be faster than my solution too.
        The API Bible: Things You Should Know Before Starting API Development

        Comment


        • Please add possibility to get info about matches from practice games, for example, open practice games for obs with mode latest, it would be enough. Pleaseee...

          Comment


          • Originally posted by MuppetMaster42 View Post
            that works in 32-bit PHP?
            yea it works perfect. but if you have 32bit and wanna 64bit there's no way to get it.. for this way since my current server is 32bit, i created script on another server that returns 64bit if 32bit is given...

            Comment


            • Smrth - use bcmath extension where you can do precise operations on very large numbers, and it doesn't matter if it's 32bit PHP or 64bit.

              Comment


              • Originally posted by BlueCloud View Post
                Smrth - use bcmath extension where you can do precise operations on very large numbers, and it doesn't matter if it's 32bit PHP or 64bit.
                sorry to ask this but how would you get 64bit out from 32bit? iv'e been trying/googling since you replied without success.. or to "STEAM_0:1:39787388" format...

                Comment


                • Originally posted by Smrth View Post
                  sorry to ask this but how would you get 64bit out from 32bit? iv'e been trying/googling since you replied without success.. or to "STEAM_0:1:39787388" format...
                  Just reverse the substraction method from the previous pages, like so:

                  PHP Code:
                  function reverse_steam_id($id) {
                  return 
                  $id 76561197960265728;

                  Comment


                  • Converting accountId to SteamId (64bit):

                    Code:
                    public static function convertAccountIdToSteamId64($accountId)
                    {
                        return  \bcadd($accountId, "76561197960265728", 0);
                    }

                    Converting SteamId (64bit) to accountId:
                    Code:
                    public static function convertSteamId64ToAccountId($steamId64)
                    {
                        return \bcsub($steamId64, "76561197960265728", 0);
                    }
                    bcadd / bcsub simply returns number as a string, and also as a arguments to bcmath functions you can pass numbers as a strings.
                    Last edited by BlueCloud; 08-10-2012, 05:30 AM.

                    Comment


                    • @BlueCloud this worked like charm. thanks!

                      we'll have few drinks when we meet on some wadding...

                      edit: btw is api offline or is it just me?
                      Code:
                      https://api.steampowered.com/IDOTA2Match_570/GetMatchHistory/V001/?key=<key>
                      Last edited by Smrth; 08-10-2012, 05:55 AM.

                      Comment


                      • Originally posted by Smrth View Post
                        edit: btw is api offline or is it just me?
                        It's not returning anything for me either. Wonder what's going on.

                        Comment


                        • Sorry, double post.

                          Comment


                          • Look at page 27:

                            Originally posted by Zoid View Post
                            The Match API has been disabled for performance reasons at this time. We hope to restore it after making some adjustments tomorrow.

                            Comment


                            • Originally posted by BlueCloud View Post
                              It would be great to create option of fetching just the match id and nothing else from "match history" API method. It could be activated aby URL parameter like: match_id_only=1 etc.

                              For that option maximum number of returned matches should be increased - simply because match id is much less data than information about participating players, start of the match etc.

                              It could decrease number of API calls/requests for people who for example just want to find all matches in some range of time and later fetch detailed infomation about the games from " details of a match" API method.
                              This would be awesome. I support this!

                              Comment


                              • Does anyone know the uptime for the API? I want to push an update to my ios app, but dont want to do it when it's broken... I probably should put a more concise error displayed to the user when downtime happens

                                Comment

                                Working...
                                X