ArgentPonyWarcraftClient 1.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 1.0.1                
NuGet\Install-Package ArgentPonyWarcraftClient -Version 1.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="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ArgentPonyWarcraftClient --version 1.0.1                
#r "nuget: ArgentPonyWarcraftClient, 1.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=1.0.1

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

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 "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, "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 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.