Setting up a common core
Before we get into the details, we want to set ourselves up for success. At the time of writing, none of the Language APIs we will be covering have NuGet client packages. As such, we will need to call directly to the REST endpoints. Because of this, we will do some work beforehand, to make sure we get away with writing less code.
New project
We will not be adding the APIs to our Smart-House application. Go on and create a new project, using the MVVM template created in Chapter 1, Getting Started with Microsoft Cognitive Services:
Go into the NuGet package manager and install
Newtonsoft.Json
. This will help us deserialize API responses and serialize request bodies.Right-click on References.
In the Assemblies tab, select System.Web and System.Runtime.Serialization.
Click OK.
In the
MainView.xaml
file, add aTabControl
element. All our additional views will be added asTabItems
in the MainView.
Web requests
All the APIs follow the same patterns. They call on their respective...