Schnorschel / assignments

0 stars 0 forks source link

week 10 - day 01 - blog-o-sphere - #33

Closed Schnorschel closed 4 years ago

Schnorschel commented 4 years ago

Blog Series Finally

We are approaching the final stretch of topics and tonight we will be preparing for the final stretch.

For this assignment, we are going to be blogging and practicing everything we have a talk about.

Objectives

Explorer

Adventure

Schnorschel commented 4 years ago
function minValue(values){
  let mySet = new Set(values)
  let myArray = [...mySet]
  return Number(myArray.sort().join(''))
}
Schnorschel commented 4 years ago

Web APIs

(Web) APIs are a means to interact with a database via http-requests. A request from a client to a Web API server is returned by a response from the server to the client.

API calls often mimic the fundamental operations on databases: Create, Read, Update and Delete (aka "CRUD") and are implemented by the following types of http-requests:

Often, a generic GET-request is being sent to the server to retrieve all or a limited batch of data records from the API server. Each returned data record may contain a unique Id that can be utilized for a subsequent request to get more detailed information on that data record. If a lot of data is hosted on the server, sending all possible data records to the client may be prohibitive, therefore pagination is often used that sends back batches of perhaps 20 or 50 data records, each of them being identified with a page number. Subsequently, the client may request another page of the same request in order to see more data records.

Requests can be successful or unsuccessful. The responses contain status code numbers that indicate whether an error occurred or not, and, what type of error (or success). Error codes are usually three-digit numbers; those beginning with 2 indicate a successful response, codes 4xx indicate a request error, 5xx suggest a server error.

Requests are typically sent from a front-end application that allows a user to interact with an API via an appropriate and comfortable user interface.

The nature of an API by being a standalone system allows for creating (front-end) applications on any platform or for any device to interact with the API. For instance, a smart phone app or a web client app both can be programmed to access the same API and they each may be developed using completely different technologies and have different sets of features.