Crates.io | malevolence |
lib.rs | malevolence |
version | 0.1.0 |
source | src |
created_at | 2023-07-17 18:02:53.935097 |
updated_at | 2023-07-17 18:02:53.935097 |
description | Unofficial Rust bindings for the OpenDota API |
homepage | |
repository | https://github.com/fawni/malevolence |
max_upload_size | |
id | 918728 |
size | 22,789 |
Unofficial Rust bindings for the OpenDota API
Malevolence stands for Orchid Malevolence. "Orchid" is squatted by a non-existent crate.
use malevolence::Client;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new(None);
let dota_match = client.get_match(7_242_624_734).await?;
println!("{:?}", dota_match.winner());
Ok(())
}
GET /matches/{match_id}
GET /playersByRank
GET /players/{account_id}
GET /players/{account_id}/wl
GET /players/{account_id}/recentMatches
GET /players/{account_id}/matches
GET /players/{account_id}/heroes
GET /players/{account_id}/peers
GET /players/{account_id}/pros
GET /players/{account_id}/totals
GET /players/{account_id}/counts
GET /players/{account_id}/histograms
GET /players/{account_id}/wardmap
GET /players/{account_id}/wordcloud
GET /players/{account_id}/ratings
GET /players/{account_id}/rankings
POST /players/{account_id}/refresh
GET /proPlayers
GET /proMatches
GET /publicMatches
GET /parsedMatches
GET /distributions
GET /search
GET /rankings
GET /benchmarks
GET /findMatches
GET /heroes
GET /heroes/{hero_id}/matches
GET /heroes/{hero_id}/matchups
GET /heroes/{hero_id}/durations
GET /heroes/{hero_id}/players
GET /heroes/{hero_id}/itemPo
GET /heroStats
GET /leagues
GET /leagues/{league_id}
GET /leagues/{league_id}/matches
GET /leagues/{league_id}/teams
GET /teams
GET /teams/{team_id}
GET /teams/{team_id}/matches
GET /teams/{team_id}/players
GET /teams/{team_id}/heroes
GET /replays
GET /live
GET /scenarios/itemTimings
GET /scenarios/laneRoles
GET /scenarios/misc