Giter Site home page Giter Site logo

apatel-gpsw / dotaweb Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 2.3 MB

The Web UI that utilizes Dota2 steam API using C# and ReactJS

C# 23.23% CSS 1.02% ASP 0.03% JavaScript 63.58% HTML 12.14%
dotnet mvc5 react reactjs dota2 dota2-api steam steam-api

dotaweb's Introduction

DotaWeb

Sample Table (Match ID: 4169885095)

table

C# MVC web application to show match details using the Steam APIs.

First things first, register yourself on https://steamcommunity.com/dev/apikey and replace the "APIKey" you receive in the web.config

Steam API documentation used (Dota Game ID: 570) https://steamwebapi.azurewebsites.net/

Subset of useful APIs https://dev.dota2.com/showthread.php?t=58317

Get Images https://dev.dota2.com/showthread.php?t=138016

Flow:

  1. Build Items List object using GetGameItems().

    API: http://api.steampowered.com/IEconDOTA2_570/GetGameItems/v0001/?key=api_key&language=en
    Item Image URL example: http://cdn.dota2.com/apps/dota2/images/items/blink_lg.png

    Item JSON Object

    {
    "result":{
       "items":[
             {
                "id":1,
                "name":"item_blink",
                "cost":2250,
                "secret_shop":0,
                "side_shop":1,
                "recipe":0,
                "localized_name":"Blink Dagger"
             }
          ]
       }
    }
  2. Build Heroes List object using GetHeroes().

    API: https://api.steampowered.com/IEconDOTA2_570/GetHeroes/v0001/?key=api_key&language=en
    Hero Image URL example: http://cdn.dota2.com/apps/dota2/images/heroes/antimage_lg.png

    Hero JSON Object

    {
    "result":{
       "heroes":[
             {
                "name":"npc_dota_hero_antimage",
                "id":1,
                "localized_name":"Anti-Mage"
             }
          ]
       }
    }
  3. Build Abilities List object using npc_abilities.txt file. Steam doesn't provide any API to fetch the abilities, not sure why.

    Ability Image URL example: http://cdn.dota2.com/apps/dota2/images/abilities/antimage_blink_md.png

    Ability text Object

    {
       "DOTAAbilities":{
         "antimage_mana_break"
         {
           "ID"                  "5003"
           "AbilityBehavior"         "DOTA_ABILITY_BEHAVIOR_PASSIVE"
           "AbilityUnitDamageType"      "DAMAGE_TYPE_PHYSICAL"      
           "SpellImmunityType"         "SPELL_IMMUNITY_ENEMIES_NO"
           "AbilitySpecial"
           {
             "01"
             {
                "var_type"         "FIELD_FLOAT"
                "damage_per_burn"   "0.6"
             }
             "02"
             {
                "var_type"         "FIELD_INTEGER"
                "mana_per_hit"      "28 40 52 64"
             }
           }
         }
       }
    }
    
  4. Get match details using GetMatchDetails(). For now, only the search by match id is available.

  5. Show the match data in a tabular format on the UI.

    API: https://api.steampowered.com/IDOTA2Match_570/GetMatchDetails/V001/?&key=api_key&match_id=match_id=en

TODO: Player Profile http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=api_key&steamids=76561197989505287&language=en

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.