ArgentPonyWarcraftClient 1.0.1
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.
See the version list below for details.
dotnet add package ArgentPonyWarcraftClient --version 1.0.1
NuGet\Install-Package ArgentPonyWarcraftClient -Version 1.0.1
<PackageReference Include="ArgentPonyWarcraftClient" Version="1.0.1" />
paket add ArgentPonyWarcraftClient --version 1.0.1
#r "nuget: ArgentPonyWarcraftClient, 1.0.1"
// 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+.
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 | Versions 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. |
-
.NETStandard 1.1
- NETStandard.Library (>= 1.6.1)
- Newtonsoft.Json (>= 11.0.1)
- System.ComponentModel.Annotations (>= 4.4.1)
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.2.22 | 1,768 | 4/26/2024 | |
8.1.8 | 1,935 | 4/29/2023 | |
8.0.24 | 1,148 | 3/18/2023 | |
7.0.38 | 1,415 | 7/21/2021 | |
6.1.10 | 1,032 | 5/19/2021 | |
6.0.20 | 1,084 | 3/30/2021 | |
5.1.0 | 1,102 | 1/20/2021 | |
5.0.0 | 1,000 | 12/10/2020 | |
4.1.0 | 1,325 | 9/10/2020 | |
4.0.0 | 1,236 | 7/25/2020 | |
4.0.0-alpha.7 | 290 | 7/20/2020 | |
4.0.0-alpha.6 | 251 | 7/16/2020 | |
4.0.0-alpha.5 | 294 | 7/9/2020 | |
4.0.0-alpha.4 | 303 | 7/1/2020 | |
4.0.0-alpha.3 | 317 | 6/21/2020 | |
4.0.0-alpha.2 | 383 | 6/13/2020 | |
4.0.0-alpha.1 | 274 | 6/8/2020 | |
3.0.1 | 1,629 | 2/6/2019 | |
3.0.0 | 1,661 | 1/15/2019 | |
2.1.0 | 1,642 | 8/26/2018 | |
2.0.0 | 1,713 | 7/18/2018 | |
1.0.1 | 1,809 | 3/26/2018 | |
1.0.0 | 1,703 | 2/21/2018 | |
0.9.2 | 1,718 | 12/14/2017 | |
0.9.1 | 1,850 | 12/7/2017 | |
0.9.0 | 2,007 | 9/24/2017 |