Skip to content

.NET Implementation of the Battle.net Diablo API.

License

Notifications You must be signed in to change notification settings

leardev/DiabloSharp

Repository files navigation

DiabloSharp - A .NET Implementation of the Battle.net Diablo API

Builds: Build status

NuGet: Build status

Coverage: codecov

NuGet

You can add the API to your project via nuget-package:

Install-Package DiabloSharp

//or

Install-Package DiabloSharp -pre

Example

You can find more samples under .\samples.

var configuration = new DiabloApiConfiguration
{
    ClientId = "YOUR_BATTLE_NET_CLIENT_ID",
    ClientSecret = "YOUR_BATTLE_NET_CLIENT_SECRET",
    Region = Region.Europe,
    Localization = Localization.EnglishUs
};

var api = new DiabloApi(configuration);
var authenticationScope = await api.CreateAuthenticationScopeAsync();
var battleTagId = new BattleTagId("BATTLE_TAG_NAME#BATTLE_TAG_ID");
var account = await api.Profile.GetAccountAsync(authenticationScope, battleTagId);