Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PART 1 - Making Use of a REST API and Web Requests Make Web Requests to Receive Data (REST), you will need to learn more

PART 1 - Making Use of a REST API and Web Requests

Make Web Requests to Receive Data (REST), you will need to learn more on what this is.

You can use Postman (app) to test requests

TwitterGet trending tags: https://dev.twitter.com/rest/reference/get/trends/place

WeatherGet Local Temperature: https://openweathermap.org/api

For example: You can hit a URL like : api.openweathermap.org/data/2.5/forecast?lat=35&lon=139

The,response format that you get is called JSON (Javascript Object Notation). You will want to read up more on this (http://codular.com/json).

A good JSON editor is: http://www.jsoneditoronline.org/ It can easily parse it and let you understand the JSON.

Your Java Program will need to parse the JSON to make use of the data. You will definitely need to use a library to parse the Json. GSON is a good library to use, look it up on your own. Use this website for reference:

http://www.oracle.com/technetwork/articles/java/json-1973242.html

Ideally, you will want to make a method that you can call in your Java program that return this information to you.

For example a function like: int getWeather(string city) -> returns the current temperature from the Weather API

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago