What are API's?

  • Working with APL and ASCii
  • API: (Application programming interface) a way for multiple computer programs to communcate with each other
  • EX: a weather station has a software to detect weather daily. This can be displayed on the weather app on your phone. The weather app communicates with the weather station's software program
  • RapidAPI: Used to connect API's

Questions

  1. What are the benefits of using API?
  • Make a way for different softwares/programs to communicate with each other
  • Make it easier to us the data from others
  1. Benefits of using backend development?
  • We can display data collected from other codes
  • Can be used in our group project
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

//RapidAPI header  https://email-verifier-api.p.rapidapi.com/v2/ 
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://email-verifier-api.p.rapidapi.com/v2/"))
    .header("x-rapidapi-key", "92c856bffamsh4d4b153731a7d0ap179808jsn6ae68da3ab4c")
    .header("x-rapidapi-host", "email-verifier-api.p.rapidapi.com")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();

//RapidAPI request and response
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());

//RapidAPI Body
System.out.println(response.body());