ArgentPonyWarcraftClient 3.0.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.
dotnet add package ArgentPonyWarcraftClient --version 3.0.1
NuGet\Install-Package ArgentPonyWarcraftClient -Version 3.0.1
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.
<PackageReference Include="ArgentPonyWarcraftClient" Version="3.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ArgentPonyWarcraftClient --version 3.0.1
#r "nuget: ArgentPonyWarcraftClient, 3.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. 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=3.0.1

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

Argent Pony Warcraft Client

The Argent Pony Warcraft Client is a .NET client for the Blizzard World of Warcraft Community 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 a Battle.net account and a client ID. Follow Blizzard's Getting Started instructions.

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 client ID and client secret that you registered for in the Prerequisites step. For simplicity, these values are 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 clientId = "MY-CLIENT-ID-GOES-HERE";
string clientSecret = "MY-CLIENT-SECRET-GOES-HERE";
var warcraftClient = new WarcraftClient(clientId, clientSecret);

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(clientId, clientSecret, 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 APIs documentation to learn more about what else you can do.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.1 is compatible.  netstandard1.2 was computed.  netstandard1.3 was computed.  netstandard1.4 was computed.  netstandard1.5 was computed.  netstandard1.6 was computed.  netstandard2.0 was computed.  netstandard2.1 was computed. 
.NET Framework net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Windows Phone wpa81 was computed. 
Windows Store netcore was computed.  netcore45 was computed.  netcore451 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
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
8.1.8 1,836 4/29/2023
8.0.24 1,081 3/18/2023
7.0.38 1,366 7/21/2021
6.1.10 993 5/19/2021
6.0.20 1,045 3/30/2021
5.1.0 1,077 1/20/2021
5.0.0 977 12/10/2020
4.1.0 1,296 9/10/2020
4.0.0 1,198 7/25/2020
4.0.0-alpha.7 278 7/20/2020
4.0.0-alpha.6 239 7/16/2020
4.0.0-alpha.5 282 7/9/2020
4.0.0-alpha.4 288 7/1/2020
4.0.0-alpha.3 300 6/21/2020
4.0.0-alpha.2 371 6/13/2020
4.0.0-alpha.1 261 6/8/2020
3.0.1 1,582 2/6/2019
3.0.0 1,629 1/15/2019
2.1.0 1,604 8/26/2018
2.0.0 1,678 7/18/2018
1.0.1 1,777 3/26/2018
1.0.0 1,664 2/21/2018
0.9.2 1,676 12/14/2017
0.9.1 1,816 12/7/2017
0.9.0 1,967 9/24/2017