Giter Site home page Giter Site logo

warcraft's Introduction

Argent Pony Warcraft Client

The Argent Pony Warcraft Client is a .NET client for the Blizzard World of Warcraft APIs. It lets .NET applications easily access information about World of Warcraft characters, guilds, items, spells, and more. It is a .NET Standard 2.0 library, which means it supports a broad range of platforms, including .NET 8 (long term support), and .NET Framework 4.6.2+.

NuGet version build CodeQL

Documentation

Documentation is available at https://blizzard-net.github.io/warcraft/

Quick Start

Create a new Console Application in Visual Studio or via dotnet new.

dotnet new console --name QuickStart

Add the ArgentPonyWarcraftClient NuGet package to the project:

dotnet add QuickStart package ArgentPonyWarcraftClient

Update Program.cs in the new project as follows, subsituting your own client ID and secret from Blizzard's Getting Started instructions:

using System;
using System.Threading.Tasks;
using ArgentPonyWarcraftClient;

namespace QuickStart
{
    class Program
    {
        static async Task Main(string[] args)
        {
            // Secrets from https://develop.battle.net/documentation/guides/getting-started.
            string clientId = "MY-CLIENT-ID-GOES-HERE";
            string clientSecret = "MY-CLIENT-SECRET-GOES-HERE";
            var warcraftClient = new WarcraftClient(clientId, clientSecret);

            // Retrieve the character profile for Drinian of realm Norgannon.
            RequestResult<CharacterProfileSummary> result =
                await warcraftClient.GetCharacterProfileSummaryAsync("norgannon", "drinian", "profile-us");

            // If we got it, display the level.
            if (result.Success)
            {
                CharacterProfileSummary profile = result.Value;
                Console.WriteLine($"Level for {profile.Name}: {profile.Level}");
            }
        }
    }
}

Build and run the console application.

cd QuickStart
dotnet run

The console output displays the profile data that was retrieved from the Blizzard Character Profile API. The library supports many other APIs, too.

Level for Drinian: 70

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.