Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Evaldo Bratti
    @evaldobratti
    Joshua Duffy
    @joshuaduffy
    Yeah, seems like a good thing to include. I think with doing something like that we should make a start on returning objects instead of dictionaries too? Thoughts?
    Evaldo Bratti
    @evaldobratti
    I don't know if there is a lot of changes we can make from the json's objects, we could just make a python object equivalent to the json object, se we can access fields in a object way instead of map way. That would be good I think. The problem is to parse the response to correct objects :worried:
    Joshua Duffy
    @joshuaduffy
    Yeah will be a lot of work, I've made a start on it however :) Should take a few weeks but the response object will be either a Match, or a list of matches, a user etc.
    then we can have objects like heroes & players within the match
    Evaldo Bratti
    @evaldobratti
    Just pushed a branch with parser of a match
    Currently it's just parsing a match if the root of the result is a match with all informations
    there are tests failing because of that
    but it's just a start
    maybe we can work on the same branch
    Evaldo Bratti
    @evaldobratti
    get match and get match history are parsed, I think
    there are the other responses, as get items, get heroes, leagues etc
    Evaldo Bratti
    @evaldobratti
    I'll work again during the week
    Joshua Duffy
    @joshuaduffy
    Hey, same, working lates at the moment, so not much time, but hopefully next week I will have :)
    Evaldo Bratti
    @evaldobratti
    "scoreboard":{
    "duration":2335.81787109375,
    "roshan_respawn_timer":0,
    "radiant":{
    "score":19,
    "tower_state":1796,
    "barracks_state":51,
    "picks":[ ... ],
    "bans":[ ... ],
    "players":[ ... ],
    "abilities":[ ... ],
    "abilities":[ ... ],
    "abilities":[ ... ],
    "abilities":[ ... ],
    "abilities":[ ... ]
    },
    this is part of the result of live league games
    the problem is "abilities" repeating 5 times (1 per player I think), but they are in same level of object "scoreboard"
    when you get json['scoreboard']['abilities'] it only get the last abitilities object
    I couldn't find anything yet reporting this issue
    https://wiki.teamfortress.com/wiki/WebAPI/GetLiveLeagueGames shows nothing about 'scoreboard' object
    it's strange :worried:
    Evaldo Bratti
    @evaldobratti
    oh god, just found it
    it's a bug
    well have to hack the json
    Joshua Duffy
    @joshuaduffy
    I'll take a look at this on the weekend!
    Nice find!
    Joshua Duffy
    @joshuaduffy
    Apologies, haven't had the time to do this yet! Will look at this very soon though :)
    Evaldo Bratti
    @evaldobratti
    no problem :)
    just pushed a commit with url support for items and heroes
    there are some types that could be improved, like leagueid turning into league_id, more 'pythonic'
    and we could convert some booleans values, like 0 turning to false and so on
    but it takes time to review all responses to find out what to convert
    Joshua Duffy
    @joshuaduffy
    Yeah it does!
    I'm working quite a lot at the moment too, finding it hard to make the time, hopefully in the coming weeks I can change that though :)
    Evaldo Bratti
    @evaldobratti
    no problem
    I started to work in another app that will use dota2api, but the pip install is not working, it's not installing the requests lib
    no wonder why :worried:
    Evaldo Bratti
    @evaldobratti
    I was trying to find the error behind the pip install, and discovered that is not working only on a virtual environment
    when it's being installed on system wide, it works nicely
    Joshua Duffy
    @joshuaduffy
    Yeah I'm not sure why the dependency doesn't install :/
    In the setup.py I defined it as a dependency but it doesn't seem to pick it up!
    Evaldo Bratti
    @evaldobratti
    maybe I fixed it. The problem was setup.py referencing dota2api package, and init.py had a dependency to requests, since init.py couldn't be built, the setup.py fails entirely. I separated Initialise from init.py to api.py and it worked smoothly :smile:
    Joshua Duffy
    @joshuaduffy
    Ooh, nice find. Shall we get that merged into the main branch? I'm hoping I can review the objects branch soon and get the ball rolling with the new version.
    Evaldo Bratti
    @evaldobratti
    I don't know if there are people using the api from source. In the object_response branch there is still a issue with players with syllabear hero
    It's not parsing bear items. Finishing that we can update documentation and merge into master, problably releasing a new version
    Evaldo Bratti
    @evaldobratti
    I had some issues with abilities ids when I was downloading my matches, some 6.84 aghs upgrades are not on our file and seems that others has changed. Do you know where we can find an updated version of that?