Example project Weather

We will now create a new Xamarin.Forms (PCL) solution named Weather. It will allow us to write a location in a text box and it will provide the weather condition of the location using an external service provided as RESTful APIs.

We will use the APIs provided from http://openweathermap.org/api.

We will start importing all the base code we've written for the previous projects and we can add an empty class called HTTPHelper in the Servicessubfolder of the Base layer.

In this class, we will define each method to make a data request:

public class HTTPHelper { public HTTPHelper () { } public async Task<string> GET ( string url ) { return "//To implement"; } public async Task<string> POST ( string url ) { return "//To implement"; ...

Get Xamarin 4 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.