ArgentPonyWarcraftClient 2.0.0

.NET Standard 1.1
Additional Details

Versions 3.0.1 and earlier of ArgentPonyWarcraftClient were designed to work with the Blizzard Community APIs, which are no longer supported.  Please migrate to version 4.0, which works with the blizzard Game Data and Profile APIs.

There is a newer version of this package available.
See the version list below for details.
NuGet\Install-Package ArgentPonyWarcraftClient -Version 2.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
dotnet add package ArgentPonyWarcraftClient --version 2.0.0
<PackageReference Include="ArgentPonyWarcraftClient" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ArgentPonyWarcraftClient --version 2.0.0
#r "nuget: ArgentPonyWarcraftClient, 2.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install ArgentPonyWarcraftClient as a Cake Addin
#addin nuget:?package=ArgentPonyWarcraftClient&version=2.0.0

// Install ArgentPonyWarcraftClient as a Cake Tool
#tool nuget:?package=ArgentPonyWarcraftClient&version=2.0.0

Argent Pony Warcraft Client

The Argent Pony Warcraft Client is a .NET client for the Blizzard World of Warcraft Community Web APIs. It lets .NET applications easily access information about World of Warcraft characters, guilds, items, spells, and more. It is a .NET Standard 1.1 library, which means it supports a broad range of platforms, including .NET Core 1.0+ and .NET Framework 4.5+.

NuGet version Build status

Prerequisites

All users of the Blizzard World of Warcraft Community Web APIs must have an API key. Follow Blizzard's instructions to register a new Mashery ID.

Installing via NuGet

You can install the ArgentPonyWarcraftClient package from the NuGet Package Manager in Visual Studio or by running the following command from the Package Manager Console:

Install-Package ArgentPonyWarcraftClient

Using the Argent Pony Warcraft Client

Assuming you're working in C#, add the appropriate using statement to reference the library:

using ArgentPonyWarcraftClient;

Instantiate a WarcraftClient with the the API key that you registered for in the Prerequisites step. For simplicity, the key is stored in the source code in the example below. You should instead use the configuration API for your .NET platform to store the key securely. For example, ASP.NET Core developers should read Configuration in ASP.NET Core.

string apiKey = "MY-API-KEY-GOES-HERE";
var warcraftClient = new WarcraftClient(apiKey);

You can optionally specify the region and locale to use when calling the WarcraftClient constructor. If you omit these parameters, it will default to Region.US and "Locale.en_US". Each method on WarcraftClient also has an overload that allows you to override these default values for the current call.

var warcraftClient = new WarcraftClient(apiKey, Region.US, "Locale.en_US");

Once you have your WarcraftClient instance, you can start asking for data. All methods are asynchronous. Here's an example for retrieving a character:

RequestResult<Character> result = await warcraftClient.GetCharacterAsync("Norgannon", "Drinian", CharacterFields.All);

This will retrieve a character named Drinian from the realm Norgannon. The CharacterFields enumeration allows you to specify which portions of character-related data the Blizzard API should return. If you only want to retrieve information about the character's talents and mounts, for instance, you can ask for only those portions of the Character object to be populated.

CharacterFields fields = CharacterFields.Talents | CharacterFields.Mounts;
RequestResult<Character> result = await warcraftClient.GetCharacterAsync("Norgannon", "Drinian", fields);

Each request is wrapped in the RequestResult<T> class. Which has the following properties.

  • Value (The generic type argument)
  • Error (RequestError class)
    • Code (The HTTP status code)
    • Type (The HTTP status code description)
    • Detail (The details of why the request failed)
  • Success (bool)

A proper method call could look like this.

RequestResult<Character> result = await warcraftClient.GetCharacterAsync("Norgannon", "Drinian", CharacterFields.All);

if (result.Success)
{
    Console.WriteLine("Character Name: " + result.Value.Name);
    Console.WriteLine("Character Level: " + result.Value.Level);
}
else
{
    Console.WriteLine("HTTP Status Code: " + result.Error.Code);
    Console.WriteLine("HTTP Status Description: " + result.Error.Type);
    Console.WriteLine("Details: " + result.Error.Detail);
}

Take a look at the WarcraftClientTests class and the Blizzard World of Warcraft Community Web APIs documentation to learn more about what else you can do.

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp1.0 netcoreapp1.1 netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard1.1 netstandard1.2 netstandard1.3 netstandard1.4 netstandard1.5 netstandard1.6 netstandard2.0 netstandard2.1
.NET Framework net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen30 tizen40 tizen60
Universal Windows Platform uap uap10.0
Windows Phone wpa81
Windows Store netcore netcore45 netcore451
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ArgentPonyWarcraftClient:

Package Downloads
ArgentPonyWarcraftClient.Extensions.DependencyInjection

Extensions of Microsoft.Extensions.DependencyInjection for the Argent Pony .NET client.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
7.0.38 540 7/21/2021
6.1.10 253 5/19/2021
6.0.20 264 3/30/2021
5.1.0 337 1/20/2021
5.0.0 305 12/10/2020
4.1.0 601 9/10/2020
4.0.0 496 7/25/2020
4.0.0-alpha.7 234 7/20/2020
4.0.0-alpha.6 190 7/16/2020
4.0.0-alpha.5 231 7/9/2020
4.0.0-alpha.4 240 7/1/2020
4.0.0-alpha.3 252 6/21/2020
4.0.0-alpha.2 322 6/13/2020
4.0.0-alpha.1 212 6/8/2020
3.0.1 837 2/6/2019
3.0.0 920 1/15/2019
2.1.0 820 8/26/2018
2.0.0 944 7/18/2018
1.0.1 976 3/26/2018
1.0.0 925 2/21/2018
0.9.2 903 12/14/2017
0.9.1 1,045 12/7/2017
0.9.0 1,178 9/24/2017