Over the course of the past few weeks my team has been hard at work on creating a bunch of Starter Kits in response to the questions we had been getting from Windows Store developers. In particular these Kits focus on calling open web API’s for numerous services and wrap them into workable sample apps. There are a bunch of samples written in both WinJS and XAML/C# for you to take advantage of when building your own apps. All of this code is open source and available right now on Github for you to use in your own apps!
For a great example of a XAML/C# version check out Bob Familiar’s overview of the Rotten Tomatoes Starter Kit here.
World of Warcraft API Starter Kit for Windows Store Apps
I chose to use Blizzard’s World of WarCraft APIs for the sample app to display Realm Status (these are the game servers for World of Warcraft). For those not in the know World of Warcraft is a very successful online game from Blizzard Entertainment® and offers an excellent open api to get game statistics. The full API documentation can be found at http://blizzard.github.io/api-wow-docs/.
Currently I have implemented the WOW API into three core pieces of functionality.
- Realm Status (individual)
- Realm Status (all)
- Localization (results from WOW API can be returned in en_US, es_MX, or pt_BR)
I wanted the Windows Store App to also serve as a workable app template for helping your own apps pass certification. Taken what I’ve learned from my own apps I’ve implemented several pieces of functionality I’ve seen developers fail certification on or get tripped up with during development. This sample app includes workable functionality for all of the following:
- Application Bar (For Language Localization settings)
- Share Contract (Share at any time from any of the pages)
- Settings and Privacy Panel
- Icons (Sample Icon and Images)
- Roaming Settings (Localization settings are stored in the users roaming settings)
- Scaling (App uses a ViewBox control to scale up on screens larger than 1366x768)
- Windows 8
- Visual Studio 2012 Express for Windows 8 or higher
- Download the Starter Kit Zip Portfolio from (http://apimash.github.io/StarterKits/)
- Open the Solution in Visual Studio
- Compile and Run
Step 1. All of the Blizzard World of Warcraft API's do not require a developer key to use. However, if you plan on creating an application with heavy api usage Blizzard requests you contact them at firstname.lastname@example.org to register your application.
Step 2. Currently only Realm Status is implemented. Adding additional functionality such as character or pvp info is as easy as calling the appropriate wow api (found in http://blizzard.github.io/api-wow-docs/) and then wrapping it in a function the same way realm status was done in /js/wowapi.js.