Introduction to API

Application ProgrammingInterface

  • Analogous to a User Interface.
  • Allow programs to communicate with each other.

Aim

  • What is an API
  • Demo - A webpage calling a JavaScript program calling a Python program

 

API

  • API is a specification or a set of rules that describe the expected behaviour of a program.
  • Hides implementation details.
  • Allows abstraction of logic / modular programming.

 

e.g. https://docs.python.org/3/library/math.html

Different types of API

  • The same API can be implemented as libraries in multiple languages.
  • Libraries / frameworks are language specific.
  • Web services are language agnostic.

 

Web services

Made with Slides.com