Skip to content
sibi edited this page Nov 21, 2016 · 3 revisions

LAB ASSIGNMENT #9

Question:

Create a Private REST service that is Mashup of at least two public REST services.Try to use a different web service and create some good use case

Answer

Two Public REST APIs Used:

REST Countries:

The details of a Country is returned in JSON where I used the latitude and longitude to make the next API(OpenWeatherMap) call. JSON Objects/Arrays used from this API are Name,Capital,Region,Population and Currency

An Example of JSON Response from this API call

OpenWeatherMap:

Using the latitude and longitude from the above API the current weather in the area of the given coordinates are displayed. JSON Objects/Arrays used here are Condition,Temperature,Pressure and Humidity

An Example of JSON Response from this API call

MashUp of the above two services:

Using the JSON Objects/Arrays from the above two services, a new JSON is created which combines all the above mentioned JSON Objects/Arrays into a single JSON.

Entire code is shown in notepad for continuity

JSON Response of the above created custom service

Question

Use this private web service in your web/mobile/hybrid application.Application should have good UI/UX.

Answer

Used the above custom private service in a web Application. AngularJS,HTML and CSS are used to Parse and Display the JSON and to create a good UI. UI was carefully developed to provide clear visibility as well as to attract Users to use the Application.

AngularJS Parsing

HTML Code

Application

Clone this wiki locally