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

  • hiimhanshuru
    replied
    EDIT: Nevermind, I was able to solve my own issue.

    I needed to drop and recreate the tables in the database in order to save new matches.
    Last edited by hiimhanshuru; 08-07-2016, 04:43 PM.

    Leave a comment:


  • GelioS
    replied
    itwisha, check Install-section - https://github.com/kronusme/dota2-api#install:
    PHP Code:
    require_once 'vendor/autoload.php';

    use 
    Dota2Api\Api;

    Api::init('YOUR_API_KEY', array('localhost''root''password''db_name''table_prefix_')); 

    Leave a comment:


  • itwisha
    replied
    what goes in config?

    Leave a comment:


  • itwisha
    replied
    hey buddy can ya tell me wht code goes in config php... i am also using it but i am kind of missing some code so need help
    thanks in advance

    Leave a comment:


  • hiimhanshuru
    replied
    Welp, I feel pretty dumb. Worked fine after removing foreign key.

    Thanks a lot. This PHP wrapper is really great.

    Leave a comment:


  • GelioS
    replied
    hiimhanshuru, did you check this https://github.com/kronusme/dota2-api#important ?

    Leave a comment:


  • hiimhanshuru
    replied
    Hi, I've found this to be an awesome resource. I'm very new to programming and even newer to PHP/MySQL, but it's been fun so far.

    Unfortunately, I haven't been able to save any matches with MatchMapperDb

    Whenever I try to execute "$mm->save($match)" for example, I receive this error (once for each slot):
    SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`bakerdota`.`ability_upgrades`, CONSTRAINT `FK_ability_upgrades_slots` FOREIGN KEY (`slot_id`) REFERENCES `slots` (`id`))

    If anyone knows how to help, I would appreciate it.

    Leave a comment:


  • GelioS
    replied
    https://github.com/kronusme/dota2-api v2.1.0
    Compatible with 6.84 changes

    Leave a comment:


  • GelioS
    replied
    Release 2.0.0 is ready.
    https://github.com/kronusme/dota2-api
    • Namespaces
    • Code style PSR-1/2
    • Install via composer
    • Autoload PSR-4
    • Tested on PHP 5.3-5.6 and HHVM


    Not compatible with 1.1.0.

    Leave a comment:


  • GelioS
    replied
    Release 1.1.0 is ready.
    https://github.com/kronusme/dota2-api/releases
    • UGC retriever is added
    • Reorganized DB schema
    • Up to date JSONs with heroes, items (including events), abilities, mods, regions etc
    • GetTournamentPrizePool request mapper is added
    • Items request is added
    • 6.82 map-image is added
    • [BugFix] teams_mapper_web doesn't map one team
    • Travis CI is added
    • Core-items are covered with tests
    • User can filter matches in the local DB using team_id
    • Many minor code fixes

    Leave a comment:


  • GelioS
    replied
    Techies, Crimson guard are already added.
    Up to date date.
    https://github.com/kronusme/dota2-api

    Leave a comment:


  • MuppetMaster42
    replied
    bump to keep this on the front page.

    IMHO this should be stickied as it's hugely useful to pretty much all webapi users.

    Leave a comment:


  • GelioS
    replied
    Mappers for prize pool are added - https://github.com/kronusme/dota2-api
    Examples:
    PHP Code:
    <?php
    require('config.php');
    $league_prize_pool_mapper_web = new league_prize_pool_mapper_web();
    $league_prize_pool_mapper_web->set_league_id(600);
    $prize_pool_info $league_prize_pool_mapper_web->load();
    print_r($prize_pool_info);
    echo 
    $prize_pool_info['prize_pool'];
    echo 
    $prize_pool_info['league_id'];
    echo 
    $prize_pool_info['status']; // may be undefined
    PHP Code:
    <?php
    require('config.php');
    $prize_pool_mapper_db = new league_prize_pool_mapper_db();
    $pp $prize_pool_mapper_db->set_league_id(600)->load();
    foreach(
    $pp as $date=>$prize_pool) {
        echo 
    $date.' - $ '.number_format($prize_pool2);
    }
    Example - http://dota2statistic.com/index.php/...tab=prize_pool

    Leave a comment:


  • MuppetMaster42
    replied
    bump to keep this on the front page.

    IMHO this should be stickied as it's hugely useful to pretty much all webapi users.

    Leave a comment:


  • GelioS
    replied
    lodagema, thanks for you response!
    You may use it any way allowed by MIT license (so, almost any way ).
    I'll be glad, if you put reference to dota2-api.
    Good luck with you project!

    SoloMidPlz, not yet supported (gonna do it, but can't make any estimates).

    Leave a comment:

Working...
X