Skip to content

Using WoWSharp

Shogo edited this page Jul 20, 2017 · 2 revisions

Requirements

WOWSharp requires .NET framework 4.0 or higher, Silverlight 4.0 or later, Windows Store 8.0 or higher, Windows Phone 7.5 or higher.

Using the Library

The example below is using C#. The same steps can be done with other .NET languages such as VB with different syntax.

  • Add Reference to WOWSharp.Community.dll in your project
  • Add the following using statements (C#) to the top of your source code file.
using WOWSharp.Community;
using WOWSharp.Community.Wow;
  • Add the code to create an instance of the ApiClient class

WowClient client = new WowClient(Region.EU); // EU region will use eu.battle.net to perform queries

  • Perform requests (Sample code below)

// gets character profile of Grendizer@Doomhammer synchronously
var character = client.GetCharacterAsync("kazzak", "Grendiser", CharacterFields.All).Result;

// get guild achievements asynchronously
var guildAchievements = await client.GetGuildAchievementsAsync();

For Sample code, please check https://wowsharp.codeplex.com/SourceControl/latest#WOWSharp2.x/WOWSharp.Community.TestConsole/ for a console application sample, and https://wowsharp.codeplex.com/SourceControl/latest#WOWSharp2.x/WOWSharp.Silverlight5Test/ for a Silverlight Sample.

Clone this wiki locally