{"id":16380949,"url":"https://github.com/vergilet/open_dota_api","last_synced_at":"2025-10-14T18:31:35.109Z","repository":{"id":23052396,"uuid":"98020702","full_name":"vergilet/open_dota_api","owner":"vergilet","description":"Ruby client for Dota 2 from OpenDotaAPI","archived":false,"fork":false,"pushed_at":"2024-08-01T23:59:54.000Z","size":836,"stargazers_count":19,"open_issues_count":1,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-08T01:27:39.520Z","etag":null,"topics":["api","dota","dota-api-wrapper","dota2-api","gem","opendota","ruby","ruby-library"],"latest_commit_sha":null,"homepage":"https://vergilet.github.io/open_dota_api/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vergilet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-22T09:19:35.000Z","updated_at":"2022-10-06T14:44:00.000Z","dependencies_parsed_at":"2025-01-03T22:02:19.964Z","dependency_job_id":null,"html_url":"https://github.com/vergilet/open_dota_api","commit_stats":{"total_commits":161,"total_committers":6,"mean_commits":"26.833333333333332","dds":0.3291925465838509,"last_synced_commit":"29bdbcf36d301e11823c9b7112c66abbed9e0336"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vergilet/open_dota_api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vergilet%2Fopen_dota_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vergilet%2Fopen_dota_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vergilet%2Fopen_dota_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vergilet%2Fopen_dota_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vergilet","download_url":"https://codeload.github.com/vergilet/open_dota_api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vergilet%2Fopen_dota_api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016832,"owners_count":26085890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","dota","dota-api-wrapper","dota2-api","gem","opendota","ruby","ruby-library"],"created_at":"2024-10-11T03:52:58.780Z","updated_at":"2025-10-14T18:31:34.734Z","avatar_url":"https://github.com/vergilet.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"right\"\u003e\n    \u003ca href=\"https://github.com/vergilet/open_dota_api\"\u003e\u003cimg align=\"\" src=\"https://user-images.githubusercontent.com/2478436/51829223-cb05d600-22f5-11e9-9245-bc6e82dcf028.png\" width=\"56\" height=\"56\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://rubygems.org/gems/open_dota_api\"\u003e\u003cimg align=\"right\" src=\"https://user-images.githubusercontent.com/2478436/51829691-c55cc000-22f6-11e9-99a5-42f88a8f2a55.png\" width=\"56\" height=\"56\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n   \u003ca href=\"https://rubygems.org/gems/open_dota_api\"\u003e\u003cimg width=\"460\" src=\"https://user-images.githubusercontent.com/2478436/28491007-95355790-6ef0-11e7-95b9-a08f585db9e8.png\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n\n:gem: Unofficial Ruby Gem for [OpenDotaAPI](https://docs.opendota.com/). This API provides Dota 2 related data. \n\n[![Gem Version](https://badge.fury.io/rb/open_dota_api.svg)](https://badge.fury.io/rb/open_dota_api)\n[![Build Status](https://travis-ci.org/vergilet/open_dota_api.svg?branch=master)](https://travis-ci.org/vergilet/open_dota_api)\n[![Code Climate](https://api.codeclimate.com/v1/badges/b27d9ae2e4796c30c290/maintainability)](https://codeclimate.com/github/vergilet/open_dota_api)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/b27d9ae2e4796c30c290/test_coverage)](https://codeclimate.com/github/vergilet/open_dota_api/coverage)\n\u003c!--[![Dependency Status](https://www.versioneye.com/user/projects/59a3b1540fb24f002b6205ef/badge.svg?style=flat)](https://www.versioneye.com/user/projects/59a3b1540fb24f002b6205ef) --\u003e\n\u003c!--[![Dependency Status](https://gemnasium.com/badges/github.com/vergilet/open_dota_api.svg)](https://gemnasium.com/github.com/vergilet/open_dota_api) --\u003e\n\n\n\n\u003e :warning: Please keep request rate to approximately 3/s.\n\n## Installation\nIf you use Rubygems you can type:\n\n```ruby\ngem install open_dota_api\n```\n\nor add this line to your application's Gemfile:\n   \n```ruby\ngem 'open_dota_api'\n```\n\nthen execute:\n```\n$ bundle\n```\n\n## Using\n\nTo use OpenDotaApi you can:\n\n```ruby\n\nrequire 'open_dota_api'\n\n```\n\nUse available methods to gather needed data:\n\n```ruby\n# Leagues listing\nOpenDotaApi.leagues\n\n# Teams listing\nOpenDotaApi.teams\n\n# Match details\nOpenDotaApi.matches(match_id)\n\n# Heroes listing\nOpenDotaApi.heroes\n\n# Pro players listing\nOpenDotaApi.pro_players\n\n# Explorer output (limited)\nOpenDotaApi.explorer(league_id)\n\n# Player (account) details\nOpenDotaApi.players(account_id)\n\n```\n\n## Premium Tier (update)\n\n**Beginning 2018-04-22, the OpenDota API is limited to 50,000 free calls per month and 60 requests/minute.**\n\n\u003e We offer a Premium Tier with unlimited API calls and higher rate limits. \n\u003e Check out the [API page](https://www.opendota.com/api-keys) to learn more.\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/vergilet/open_dota_api/tree/9-authentication-support#premium-tier-update\"\u003e\u003cimg width=\"649\" alt=\"\" src=\"https://user-images.githubusercontent.com/2478436/65829471-a6ac3000-e2ae-11e9-9b67-796e3d980b9f.png\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n**Please follow the link to [Get the KEY](https://www.opendota.com/api-keys).**\n\n#### Requests Limit:\n\nTo check the request limit for Free Tier:\n```ruby\n  OpenDotaApi.limits \n```\n*Output:*\n```hash\n  {\n    per_min: \"0\",         # request left for per minute\n    per_month: \"49878\"    # request left for per month\n  } \n```\n\n\n\n#### Using the API_KEY\n\nAfter you get you personal key you have two options:\n1. Set `api_key` globally to all your request.\n    For Rails application you can create the initializer:\n\n    ```ruby\n    # config/initializers/open_dota_api.rb\n    \n    OpenDotaApi.api_key = [YOUR_KEY_HERE]\n    ```\n\n2. Or you can set `api_key` directly in the request:\n    ```ruby\n    OpenDotaApi.leagues(api_key: [YOUR_KEY_HERE])\n   \n    OpenDotaApi.teams(api_key: [YOUR_KEY_HERE])\n   \n    OpenDotaApi.matches(match_id, api_key: [YOUR_KEY_HERE])\n   \n    OpenDotaApi.heroes(api_key: [YOUR_KEY_HERE])\n   \n    OpenDotaApi.pro_players(api_key: [YOUR_KEY_HERE])\n   \n    OpenDotaApi.explorer(league_id, api_key: [YOUR_KEY_HERE])\n    \n    OpenDotaApi.players(account_id, api_key: [YOUR_KEY_HERE])\n   ```\n   \nEnjoy!\n\n## Endpoints\n\n#### :large_blue_diamond: Leagues\n\n##### API Method: [leagues](https://docs.opendota.com/#tag/leagues)\n\n```ruby\nleagues = OpenDotaApi.leagues\nleagues                # array\n```\n```ruby\nleague = leagues.first\nleague.class           # OpenDotaApi::Leagues\n\n```\n```ruby\nleague.league_id       # Number, league ID\nleague.ticket          # String, ticket identifier\nleague.banner          # String, banner identifier\nleague.tier            # String, premiere, pro, amateur\nleague.name            # String, league name\n\n```\n#### :large_blue_diamond: Teams\n\n##### API Method: [teams](https://docs.opendota.com/#tag/teams)\n\n```ruby\nteams = OpenDotaApi.teams\nteams                  # array\n```\n\n```ruby\nteam = teams.first\nteam.class             # OpenDotaApi::Team\n```\n\n```ruby\nteam.team_id\nteam.rating\nteam.wins\nteam.losses\nteam.last_match_time\nteam.name\nteam.tag\n```\n\n#### :large_blue_diamond: Players\n\n##### API Method: [players](https://docs.opendota.com/#tag/players)\n\n```ruby\naccount_id = 65366604        # number, is required\n```\n\n```ruby\nplayer = OpenDotaApi.players(account_id)\nplayer.class                 # OpenDotaApi::Player\n```\n\n```ruby\nplayer.account_id\nplayer.mmr_estimate\nplayer.plus\nplayer.contributor?\nplayer.steam_id\nplayer.avatar\nplayer.avatar_medium\nplayer.avatar_full\nplayer.profile_url\nplayer.persona_name\nplayer.last_login\nplayer.cheese\nplayer.loc_country_code\nplayer.name\nplayer.tracked_until\nplayer.rank_tier\nplayer.competitive_rank\nplayer.solo_competitive_rank\nplayer.leaderboard_rank\n```\n\n#### :large_blue_diamond: Matches\n\n##### API Method: [matches](https://docs.opendota.com/#tag/matches)\n\n\n```ruby\nmatch_id = 0000000001        # number, is required\n```\n\n```ruby\nmatch = OpenDotaApi.matches(match_id)\nmatch.class                  # OpenDotaApi::Match\n```\n\n```ruby\nmatch.match_id\nmatch.start_time\nmatch.duration\nmatch.series_id\nmatch.series_type\nmatch.radiant_team_id\nmatch.dire_team_id\nmatch.match_seq_num\nmatch.league_id\nmatch.first_blood_time\nmatch.winner\nmatch.cluster\nmatch.replay_salt\nmatch.cluster\nmatch.replay_url\nmatch.radiant_score         # Integer\nmatch.dire_score            # Integer\nmatch.players               # array of players (type OpenDotaApi::Matches::Player)\n```\n##### :small_blue_diamond: Player\n\n```ruby\nplayers = match.players \nplayer = players.first\nplayer.class                # OpenDotaApi::Matches::Player\n```\n\n```ruby\nplayer.match_id             # related to OpenDotaApi::Match\nplayer.player_slot\nplayer.account_id\nplayer.assists\nplayer.camps_stacked\nplayer.deaths\nplayer.denies\nplayer.gold_per_min\nplayer.hero_id              # related to OpenDotaApi::Hero\nplayer.kills\nplayer.obs_placed\nplayer.sen_placed\nplayer.rune_pickups\nplayer.stuns\nplayer.xp_per_min\nplayer.name\nplayer.side\nplayer.kda\nplayer.tower_kills\nplayer.roshan_kills\nplayer.hero_healing\nplayer.last_hits\nplayer.firstblood_claimed\nplayer.hero_damage\nplayer.teamfight_participation\n```\n\n#### :large_blue_diamond: Heroes\n\n##### API Method: [heroes](https://docs.opendota.com/#tag/heroes)\n\n\n```ruby\nheroes = OpenDotaApi.heroes\nheroes.class              # array        \n```\n\n```ruby\nhero = heroes.first\nhero.class                # OpenDotaApi::Hero    \n```\n```ruby\nhero.id\nhero.name\nhero.localized_name       # \"Anti-mage\"\nhero.primary_attr\nhero.attack_type\nhero.roles                # array of roles\nhero.legs\n```\n\n#### :large_blue_diamond: Pro Players\n\n##### API Method: [proPlayers](https://docs.opendota.com/#tag/proPlayers)\n\n\n```ruby\npro_players = OpenDotaApi.pro_players\npro_players.class              # array        \n```\n\n```ruby\npro_player = pro_players.first\npro_player.class               # OpenDotaApi::ProPlayer    \n```\n\n```ruby\npro_player.account_id\npro_player.steam_id\npro_player.avatar\npro_player.avatar_medium\npro_player.avatar_full\npro_player.profile_url\npro_player.persona_name\npro_player.last_login\npro_player.full_history_time\npro_player.cheese\npro_player.fh_unavailable\npro_player.loc_country_code\npro_player.last_match_time\npro_player.name\npro_player.country_code\npro_player.fantasy_role\npro_player.team_id\npro_player.team_name\npro_player.team_tag\npro_player.locked?\npro_player.pro?\npro_player.locked_until\n```\n\n\n#### :large_blue_diamond: Explorer\n\n##### API Method: [explorer](https://docs.opendota.com/#tag/explorer)\n\n\n```ruby\nexplorer = OpenDotaApi.explorer(league_id)\nexplorer.class                  # OpenDotaApi::Explorer       \n```\n\n```ruby\nexplorer.league_matches_ids     # Array of matches IDs for current league \n```\n...\n\nThat's all for now.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/vergilet/open_dota_api\n\n\u003cimg align=\"right\" src=\"https://user-images.githubusercontent.com/2478436/28493917-7c3389c8-6f28-11e7-932e-da360b68f3d3.gif\"/\u003e \n    \nFeel free to contribute:\n1. Fork it (https://github.com/vergilet/open_dota_api/fork)\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n4. Push to the branch (git push origin my-new-feature)\n5. Create new Pull Request\n\n\n\n## License\nThe gem is available as open source under the terms of the MIT License.\n\nCopyright © 2017 Yaro.\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-brightgreen)](https://raw.githubusercontent.com/vergilet/open_dota_api/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvergilet%2Fopen_dota_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvergilet%2Fopen_dota_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvergilet%2Fopen_dota_api/lists"}