Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Setting Up Your Application

roncli edited this page Nov 12, 2014 · 4 revisions

Once you have included LibWowAPI in your project, you need to setup a few things in your application before you begin. All of these are optional, but can give your application added benefits or functionality.

Internationalization

LibWowAPI defaults to using the US region and US English as the language. You can change this in your initialization routine. For instance, here's how you would set it in a console application.

C#

using roncliProductions.LibWowAPI;
using roncliProductions.LibWowAPI.Internationalization;

class ConsoleApplication {
    void Main() {
        WowAPIData.Region = Region.Europe;
        WowAPIData.Language = Language.Français;
    }
}

VB.Net

Imports roncliProductions.LibWowAPI
Imports roncliProductions.LibWowAPI.Internationalization

Module ConsoleApplication
    Sub Main()
        WowAPIData.Region = Region.Europe
        WowAPIData.Language = Language.Français
    End Sub
End Module

Authentication

You must include your Mashery API key in order to access the API.

C#

using roncliProductions.LibWowAPI;

class ConsoleApplication {
    void Main() {
        WowAPIData.ApiKey = "ABCDEFGHIJKL";
    }
}

VB.Net

Imports roncliProductions.LibWowAPI

Module ConsoleApplication
    Sub Main()
        WowAPIData.ApiKey = "ABCDEFGHIJKL"
    End Sub
End Module

Metadata

LibWowAPI provides a way to identify your HTTP request using headers. This, too, is added in your initialization routine.

C#

using roncliProductions.LibWowAPI;

class ConsoleApplication {
    void Main() {
        WowAPIData.Application = "My WoW Application";
        WowAPIData.ApplicationURL = "http://www.mywowapplication.com";
    }
}

VB.Net

Imports roncliProductions.LibWowAPI

Module ConsoleApplication
    Sub Main()
        WowAPIData.Application = "My WoW Application"
        WowAPIData.ApplicationURL = "http://www.mywowapplication.com"
    End Sub
End Module