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.
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.
using roncliProductions.LibWowAPI;
using roncliProductions.LibWowAPI.Internationalization;
class ConsoleApplication {
void Main() {
WowAPIData.Region = Region.Europe;
WowAPIData.Language = Language.Français;
}
}
Imports roncliProductions.LibWowAPI
Imports roncliProductions.LibWowAPI.Internationalization
Module ConsoleApplication
Sub Main()
WowAPIData.Region = Region.Europe
WowAPIData.Language = Language.Français
End Sub
End Module
You must include your Mashery API key in order to access the API.
using roncliProductions.LibWowAPI;
class ConsoleApplication {
void Main() {
WowAPIData.ApiKey = "ABCDEFGHIJKL";
}
}
Imports roncliProductions.LibWowAPI
Module ConsoleApplication
Sub Main()
WowAPIData.ApiKey = "ABCDEFGHIJKL"
End Sub
End Module
LibWowAPI provides a way to identify your HTTP request using headers. This, too, is added in your initialization routine.
using roncliProductions.LibWowAPI;
class ConsoleApplication {
void Main() {
WowAPIData.Application = "My WoW Application";
WowAPIData.ApplicationURL = "http://www.mywowapplication.com";
}
}
Imports roncliProductions.LibWowAPI
Module ConsoleApplication
Sub Main()
WowAPIData.Application = "My WoW Application"
WowAPIData.ApplicationURL = "http://www.mywowapplication.com"
End Sub
End Module