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

Another way for API processing with PHP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • profano
    replied
    Originally posted by jaffarbp View Post
    Just wanted to say that you have done an awesome job! To anyone using the api just a quick tip that i somehow missed -> since you have been limited to getting up to 25 matches per request when requesting the next 25 get the oldest match id from database and search from it. Example would be ($oldest = oldest id)
    can you write a full example? tnx you man

    Leave a comment:


  • profano
    replied
    HI all, Gelios I can not make it work
    I did everything written in the readme... but tests.php doesn't work for me.
    my DB is empty, and remains empty even after uploading tests.php

    What information can I write to understand where is the problem?

    tnx a lot, and congrats for your hard work

    Leave a comment:


  • RJackson
    replied
    Originally posted by budswarez View Post
    Private Match not work get results?
    You cannot get data on private matches through the WebAPI.

    Leave a comment:


  • budswarez
    replied
    Private Match not work get results?

    Leave a comment:


  • GelioS
    replied
    https://github.com/kronusme/dota2-api - updates, bugs fixes etc.

    Leave a comment:


  • GelioS
    replied
    If you use https://github.com/kronusme/dota2-api on your site and are interested to populate it - give me link (in this thread or PM) and I'll put it to ReadMe on the GitHub.

    Leave a comment:


  • GelioS
    replied
    Dipri, https://github.com/kronusme/dota2-api#get-player-info
    To get steamId use player::convert_id (https://github.com/kronusme/dota2-ap...player.php#L79).

    Leave a comment:


  • Dipri
    replied
    With your API as I can get the nicknames of the players? because it brings the ID of the participating players a game

    Leave a comment:


  • GelioS
    replied
    Topic up.
    Fixed league listing issue.

    Leave a comment:


  • GelioS
    replied
    Jarolim, just turn off error reporting.
    In your case you just got few warnings. All works.

    Leave a comment:


  • Jarolim
    replied
    Ahh, thanks.
    But it is not working yet.

    test.php =
    <?php
    require_once ('config.php');
    $mm = new match_mapper_web(121995119);
    $match = $mm->load();
    echo $match->get('match_id');
    echo $match->get('start_time');
    echo $match->get('game_mode');
    $slots = $match->get_all_slots();
    foreach($slots as $slot) {
    echo $slot->get('last_hits');
    }
    print_r($match->get_data_array());
    print_r($match->get_slot(0)->get_data_array());
    ?>
    and I'm getting this =
    Warning: It is not yet possible to assign complex types to attributes in C:\Program Files\EasyPHP-12.1\www\api\dota2-api-master\includes\mappers\class.match_mapper_web.php on line 62

    Warning: It is not yet possible to assign complex types to attributes in C:\Program Files\EasyPHP-12.1\www\api\dota2-api-master\includes\mappers\class.match_mapper_web.php on line 62

    Warning: It is not yet possible to assign complex types to attributes in C:\Program Files\EasyPHP-12.1\www\api\dota2-api-master\includes\mappers\class.match_mapper_web.php on line 62
    1219951192013-02-10 17:44:04410753303181Array ( [match_id] => 121995119 [season] => 7 [radiant_win] => 1 [duration] => 251 [first_blood_time] => 138 [start_time] => 2013-02-10 17:44:04 [match_seq_num] => 112119348 [game_mode] => 4 [tower_status_radiant] => 2047 [tower_status_dire] => 2047 [barracks_status_radiant] => 63 [barracks_status_dire] => 63 [replay_salt] => [lobby_type] => 0 [human_players] => 10 [leagueid] => 0 [cluster] => 132 [positive_votes] => 0 [negative_votes] => 0 [radiant_team_id] => [radiant_name] => [radiant_logo] => [radiant_team_complete] => [dire_team_id] => [dire_name] => [dire_logo] => [dire_team_complete] => ) Array ( [id] => [account_id] => 4294967295 [player_slot] => 0 [hero_id] => 59 [item_0] => 25 [item_1] => 29 [item_2] => 0 [item_3] => 0 [item_4] => 0 [item_5] => 0 [kills] => 1 [deaths] => 0 [assists] => 0 [leaver_status] => 0 [gold] => 559 [last_hits] => 10 [denies] => 0 [gold_per_min] => 248 [xp_per_min] => 401 [gold_spent] => 1085 [hero_damage] => 603 [tower_damage] => 0 [hero_healing] => 0 [level] => 5 [match_id] => 121995119 )
    What can be wrong? I tried everything.

    Leave a comment:


  • GelioS
    replied
    Jarolim, we use database to store parsed matches, because access to local db is faster then to API-server.

    Leave a comment:


  • Jarolim
    replied
    I'm not a good programmer, sorry about that.
    But I can't make it work.
    And actually I don't get why we use database.

    I'm making a championship, if you wanna join me, contact me here.
    Thanks.

    Leave a comment:


  • GelioS
    replied
    Some updates. Fixed few bugs and added few improvments.

    Leave a comment:


  • GelioS
    replied
    Added class for creating map image with barracks and tower (thanks all in this thread).
    Matches_mapper_web now returns array of match objects (not assoc array of data as it was).
    Matches_mapper_db now returns data with info about additional units.

    See ReadMe with examples.

    For now map may not working sometimes - api returns incorrect values (situations when t3 tower isn't destroyed, but barracks on this line are destroyed etc).

    Leave a comment:

Working...
X