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

  • jimmydorry
    replied
    Originally posted by GelioS View Post
    Yes, I took it from your thread.
    Please keep an eye out for other clusters. I doubt I got them all as that was only from a few hour stretch of data.

    Leave a comment:


  • GelioS
    replied
    Yes, I took it from your thread.

    Leave a comment:


  • jimmydorry
    replied
    Did you already have a regions list? I would have gladly saved myself the effort.

    Leave a comment:


  • GelioS
    replied
    Dota2 API Wrapper

    Fixed Visage and Naix abilities lists.
    Regions list updated (taken from here).
    Renamed Necrolite and Windrunner.
    Added team_id parameter for matches_mapper_db (see here).
    Last edited by GelioS; 12-10-2013, 11:52 PM.

    Leave a comment:


  • GelioS
    replied
    Ember and Earth Spirits are added.

    Leave a comment:


  • GelioS
    replied
    MuppetMaster42, thanks for the response! I'll take a look about autoload (db_latest.sql is already fixed).
    ilyf422, slot_id (in the ability_upgrades and additional_units) is just a foreign key to the slots table. It is generated by the MySQL.
    PL-Pooya, sorry for the late reply, but it isn't possible.

    Leave a comment:


  • ilyf422
    replied
    useful to improve my php ability.thank u very much!
    btw,what 'slot_id' mean in database ? How to construct it?
    Last edited by ilyf422; 10-14-2013, 07:19 AM.

    Leave a comment:


  • MuppetMaster42
    replied
    found a bug:
    class.match_mapper_db.php:136
    field name for inserting into the users table is 'steamid'
    does not match the latest field list in your db_latest.sql
    Last edited by MuppetMaster42; 10-13-2013, 03:26 AM.

    Leave a comment:


  • MuppetMaster42
    replied
    You should look at doing two things:
    1) don't define the autoload function yourself, it restricts the user of your API. I was just implementing your API and I had to adjust my code to allow for our autoloads to coexist.
    i.e. use the spl_autoload_register
    Code:
    function kronusme_autoload_function($class) {
      //
    }
    spl_autoload_register( 'kronusme_autoload_function' ); // add your function to be first on the stack
    spl_autoload_register( '__autoload' ); // doesn't matter if the user hasn't defined __autoload yet, will reference it when needed.
    this way the user can define an __autoload function whenever they want and it won't cause an error because you've already defined it (or vice versa).

    2) you should look into using php namespaces so you don't pollute the global namespace.
    that way the user can define classes of the same name without worrying about it colliding
    this also lends itself to using the autoload register because you don't have to worry about accidentally loading their class in stead of yours.

    also you can streamline your class loading.


    to make it even easier, rename your class files to XXXX.class.php in stead of class.XXXX.php as you'll see below:
    your autoload function then simplifies to:

    Code:
    function kronusme_autoload_function($class) {
        	$path = config::get('base_path') . DIRECTORY_SEPARATOR . $class . '.class.php';
        	if( file_exists($path) ) {
        	    	require_once($path);
        	}
    }
    Last edited by MuppetMaster42; 10-13-2013, 02:27 AM.

    Leave a comment:


  • PL-Pooya
    replied
    Hi, Gelious.

    Let me start of by saying that i am proud of what you have achieved by combining steam api and valve api together to create this masterpiece.

    I am currently trying to build a league of my own inside my website through xenforo forums, for which i need your help if possible.

    Would it be possible for us to team up to do something together which is mutually beneficial for us ?

    Awaiting for your reply

    Leave a comment:


  • GelioS
    replied
    League mapper, updated DB schema etc.
    https://github.com/kronusme/dota2-api

    Leave a comment:


  • GelioS
    replied
    Small article about statistic - http://kronus.me/2013/08/dota2-api-h...c-ti3-matches/.
    There you can find dump with TI3 matches.

    Leave a comment:


  • GelioS
    replied
    JeraldPunx11, did you change DB host, DB name, DB user?

    Leave a comment:


  • JeraldPunx11
    replied
    hi I need help... when I try to test... the page is always loading and doesn't show anything... i enabled the cUrl extension... and i open myPhpAdmin and create table 'dota2' then import all the sql u given then edit config file and changed define ('API_KEY', '*******************'); into ('API_KEY', '79CE3A1493D7202048BA864171197C0C'); or am I doing it wrong...

    Leave a comment:


  • GelioS
    replied
    Any questions/enhancement?

    Leave a comment:

Working...
X