- From the article:
An API is defined as a specification of possible interactions with a software component.
Elaborating:
An API specifies not only the possible software to software interactions with an application and how to engage them, but also the user interactions both input and output.
-
The Twitter API is a public REST API that uses the JSON format while the Java API is an abstraction layer for the Java platform that makes it easier to code common tasks.
-
A light switch (or any power switch).
Electrical energy line: copper cables connecting light to switch to distribution board to substation/s to generator.
Light: Incandescant, Fluorescent or LED?
Incandescant: The energised line provides energy to heat a filament until itâs glowing hot.
Fluorescent:
- When you turn the light on, electrical current flows through the electrodes
- The voltage causes electrons to move through the argon gas to the other side of the tube
- The energy from this transition causes mercury to turn from a liquid into a gas
- Electrons and charged atoms collide with the gaseous mercury atoms
- The collisions increase the electronsâ energy levels
- As electrons return to their normal energy level, energy is released as photons, creating invisible-spectrum light that the human eye canât see
- The phosphor powder in the glass tube interacts with the invisible-spectrum light, producing white light that the human eye can see
LED: AC power is passed through a birdge rectifier coverting it to DC power and provided to a light-emitting diode composed of an N-type semiconductor and a P-type semiconductor. By connecting the two semiconductors and supplying a forward voltage, the electrons recombine at the P-N junction, creating electromagnetic energy thatâs emitted as light.
Distribution board: Provides electrical connection to external substation mediated by safety enhancing automatic circuit breakers.
Substation: Regulates power available to the end user
Generator: Burns the coal that heats the water that turns the turbine generating the electricity
Dump truck: Delivers the coal to burn.
Excavator: Mines the coal to burn.
All is reduced to an API requiring only a 1 or 0 (ON or OFF) to engage/interact with the system.
Of course you could break it down to being an API sitting on top of other API layers (or in between depending on how the circuit is connectedâŚ)