An unofficial player stats API for the Blizzard game "Overwatch" - Targetting .NET Standard 2.0.
A simple web scraper that grabs player stats from a users PlayOverwatch.com profile and parses it to be used however you like. It's written entirely in C# using AngleSharp to parse the data from the page. The only limiting factor is the speed at which the PlayOverwatch profile can be loaded.
- Supports PC, Xbox 1 and Playstation 4 players.
- Entirely async
- Serializable - No complex data.
- Platform detection
- Identifies and gracefully handles private profiles - parsing as much data as is available.
- Finding player aliases where a player plays on multiple platforms.
- None at the moment - Any feature requests will be placed here, however new features do make themselves into the library from time to time.
- AngleSharp - Used to parse the data from the PlayOverwatch page as no other data source is available from Blizzard.
- Newtonsoft.Json - Used to parse XHR requests for player aliases.
using(var owClient = new OverwatchClient()) // Initialising without an "OverwatchConfig" will use the Default config.
{
Player player = await owClient.GetPlayerAsync("SirDoombox#2603");
var allHeroesHealingDone = player.CasualStats.GetStatExact("All Heroes", "Assists", "Healing Done");
IEnumerable<Stat> allHealingDoneStats = player.CasualStats.FilterByName("Healing Done");
foreach(var stat in player.CasualStats)
{
string statHeroName = stat.HeroName
string statName = stat.Name;
string statCategoryName = stat.CategoryName;
string statValue = stat.Value;
}
}
NOTE: If you plan on making many requests over the lifetime of your application, I recommend keeping an instance of OverwatchClient
around and disposing of it explicitly later.
If you wish to contact me about contributing to the project, or have any questions / suggestions please feel free to come find me on the C# discord server. - @Doombox#0661
Please report any issues or bugs that you may find at your earliest convenience so I can get them fixed ASAP.