-
Notifications
You must be signed in to change notification settings - Fork 0
LAB9
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
Two Public REST APIs Used:
- REST Countries(https://restcountries.eu/)
- OpenWeatherMap(https://openweathermap.org/api)
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

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

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





Use this private web service in your web/mobile/hybrid application.Application should have good UI/UX.
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





