This project is generated for OpenDota api using swagger.
What I do:
wget http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.2.3/swagger-codegen-cli-2.2.3.jar -O swagger-codegen-cli.jar
java -jar swagger-codegen-cli.jar generate -i https://api.opendota.com/api -l python -o . --git-repo-id od-python --git-user-id seraphli --config config.jsonNB: Recommend using python 3, unless you want to deal with ssl error.
**The OpenDota API provides Dota 2 related data including advanced match data extracted from match replays. Please keep request rate to approximately 1/s. Begining 4/22/2018, the OpenDota API will be limited to 50,000 free calls per month. We'll be offering a Premium Tier with unlimited API calls and higher rate limits. Check out the API page to learn more. **
This Python package is automatically generated by the Swagger Codegen project:
- API version: 17.6.0
- Package version: 1.0.2
- Build package: io.swagger.codegen.languages.PythonClientCodegen
Python 2.7 and 3.4+
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com/seraphli/od-python.git(you may need to run pip with root permission: sudo pip install git+https://github.com/seraphli/od-python.git)
Then import the package:
import od_python Install via Setuptools.
python setup.py install --user(or sudo python setup.py install to install the package for all users)
Then import the package:
import od_pythonPlease follow the installation procedure and then run the following:
from __future__ import print_function
import time
import od_python
from od_python.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = od_python.BenchmarksApi()
hero_id = 'hero_id_example' # str | Hero ID
try:
# GET /benchmarks
api_response = api_instance.benchmarks_get(hero_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling BenchmarksApi->benchmarks_get: %s\n" % e)All URIs are relative to https://api.opendota.com/api
| Class | Method | HTTP request | Description |
|---|---|---|---|
| BenchmarksApi | benchmarks_get | GET /benchmarks | GET /benchmarks |
| DistributionsApi | distributions_get | GET /distributions | GET /distributions |
| ExplorerApi | explorer_get | GET /explorer | GET /explorer |
| HealthApi | health_get | GET /health | GET /health |
| HeroStatsApi | hero_stats_get | GET /heroStats | GET /heroStats |
| HeroesApi | heroes_get | GET /heroes | GET /heroes |
| HeroesApi | heroes_hero_id_durations_get | GET /heroes/{hero_id}/durations | GET /heroes/{hero_id}/durations |
| HeroesApi | heroes_hero_id_matches_get | GET /heroes/{hero_id}/matches | GET /heroes/{hero_id}/matches |
| HeroesApi | heroes_hero_id_matchups_get | GET /heroes/{hero_id}/matchups | GET /heroes/{hero_id}/matchups |
| HeroesApi | heroes_hero_id_players_get | GET /heroes/{hero_id}/players | GET /heroes/{hero_id}/players |
| LeaguesApi | leagues_get | GET /leagues | GET /leagues |
| LiveApi | live_get | GET /live | GET /live |
| MatchesApi | matches_match_id_get | GET /matches/{match_id} | GET /matches/{match_id} |
| MetadataApi | metadata_get | GET /metadata | GET /metadata |
| PlayersApi | players_account_id_counts_get | GET /players/{account_id}/counts | GET /players/{account_id}/counts |
| PlayersApi | players_account_id_get | GET /players/{account_id} | GET /players/{account_id} |
| PlayersApi | players_account_id_heroes_get | GET /players/{account_id}/heroes | GET /players/{account_id}/heroes |
| PlayersApi | players_account_id_histograms_field_get | GET /players/{account_id}/histograms/{field} | GET /players/{account_id}/histograms |
| PlayersApi | players_account_id_matches_get | GET /players/{account_id}/matches | GET /players/{account_id}/matches |
| PlayersApi | players_account_id_peers_get | GET /players/{account_id}/peers | GET /players/{account_id}/peers |
| PlayersApi | players_account_id_pros_get | GET /players/{account_id}/pros | GET /players/{account_id}/pros |
| PlayersApi | players_account_id_rankings_get | GET /players/{account_id}/rankings | GET /players/{account_id}/rankings |
| PlayersApi | players_account_id_ratings_get | GET /players/{account_id}/ratings | GET /players/{account_id}/ratings |
| PlayersApi | players_account_id_recent_matches_get | GET /players/{account_id}/recentMatches | GET /players/{account_id}/recentMatches |
| PlayersApi | players_account_id_refresh_post | POST /players/{account_id}/refresh | POST /players/{account_id}/refresh |
| PlayersApi | players_account_id_totals_get | GET /players/{account_id}/totals | GET /players/{account_id}/totals |
| PlayersApi | players_account_id_wardmap_get | GET /players/{account_id}/wardmap | GET /players/{account_id}/wardmap |
| PlayersApi | players_account_id_wl_get | GET /players/{account_id}/wl | GET /players/{account_id}/wl |
| PlayersApi | players_account_id_wordcloud_get | GET /players/{account_id}/wordcloud | GET /players/{account_id}/wordcloud |
| ProMatchesApi | pro_matches_get | GET /proMatches | GET /proMatches |
| ProPlayersApi | pro_players_get | GET /proPlayers | GET /proPlayers |
| PublicMatchesApi | public_matches_get | GET /publicMatches | GET /publicMatches |
| RankingsApi | rankings_get | GET /rankings | GET /rankings |
| RecordsApi | records_field_get | GET /records/{field} | GET /records/{field} |
| ReplaysApi | replays_get | GET /replays | GET /replays |
| RequestApi | request_job_id_get | GET /request/{jobId} | GET /request/{jobId} |
| RequestApi | request_match_id_post | POST /request/{match_id} | POST /request/{match_id} |
| ScenariosApi | scenarios_item_timings_get | GET /scenarios/itemTimings | GET /scenarios/itemTimings |
| ScenariosApi | scenarios_lane_roles_get | GET /scenarios/laneRoles | GET /scenarios/laneRoles |
| ScenariosApi | scenarios_misc_get | GET /scenarios/misc | GET /scenarios/misc |
| SchemaApi | schema_get | GET /schema | GET /schema |
| SearchApi | search_get | GET /search | GET /search |
| StatusApi | admin_api_metrics_get | GET /admin/apiMetrics | GET /admin/apiMetrics |
| StatusApi | status_get | GET /status | GET /status |
| TeamsApi | teams_get | GET /teams | GET /teams |
| TeamsApi | teams_team_id_get | GET /teams/{team_id} | GET /teams/{team_id} |
| TeamsApi | teams_team_id_heroes_get | GET /teams/{team_id}/heroes | GET /teams/{team_id}/heroes |
| TeamsApi | teams_team_id_matches_get | GET /teams/{team_id}/matches | GET /teams/{team_id}/matches |
| TeamsApi | teams_team_id_players_get | GET /teams/{team_id}/players | GET /teams/{team_id}/players |
- InlineResponse200
- InlineResponse2001
- InlineResponse20010
- InlineResponse20011
- InlineResponse20012
- InlineResponse20013
- InlineResponse20014
- InlineResponse20015
- InlineResponse20016
- InlineResponse20016Cheese
- InlineResponse20017
- InlineResponse20017CountryMmr
- InlineResponse20017CountryMmrFields
- InlineResponse20017CountryMmrRows
- InlineResponse20017Mmr
- InlineResponse20017Ranks
- InlineResponse20017RanksFields
- InlineResponse20017RanksRows
- InlineResponse20017RanksSum
- InlineResponse20018
- InlineResponse20019
- InlineResponse20019Rankings
- InlineResponse2001MmrEstimate
- InlineResponse2001Profile
- InlineResponse2002
- InlineResponse20020
- InlineResponse20020Result
- InlineResponse20020ResultGoldPerMin
- InlineResponse20021
- InlineResponse20022
- InlineResponse20023
- InlineResponse20024
- InlineResponse20025
- InlineResponse20026
- InlineResponse20027
- InlineResponse20028
- InlineResponse20029
- InlineResponse2003
- InlineResponse20030
- InlineResponse20031
- InlineResponse20032
- InlineResponse20033
- InlineResponse2004
- InlineResponse2005
- InlineResponse2006
- InlineResponse2007
- InlineResponse2008
- InlineResponse2009
- InlineResponse200BuybackLog
- InlineResponse200Chat
- InlineResponse200DraftTimings
- InlineResponse200KillsLog
- InlineResponse200Players
- InlineResponse200PurchaseLog
- InlineResponse200RunesLog
- PlayersaccountIdmatchesHeroes
- PlayersaccountIdmatchesHeroesPlayerSlot
- Type: API key
- API key parameter name: api_key
- Location: URL query string