Understanding how APIs work (and what they are) is tough when you're learning to code. When I was learning, it seemed like "API" was used in MANY different contexts. Here's a brief overview of APIs for the beginner developer
#api #100DaysOfCode #Coding #Developer
🧵
The reason APIs are confusing at first is because they can be discussed from so many angles.

- Is your API a RESTful, SOAP, or RPC standard?
- Is your API open, closed, composite, etc.?
- Is your API at the product, library, class, or function level?

Let's look at an analogy.
Ignore these fancy terms and think of an API like your car.

Your car has a manual. That manual tells you how to use the car. Need to replace a headlight? The manual will tell you what bulb you need.

APIs are for software as car manuals are for cars.
Here's my non-technical definition of an API:

A software #API is a "user manual" that allows #developers to do something useful with a 3rd party software/hardware without knowing the inner-workings of that software/hardware.

Now for the 3 types of APIs
There are 3 main types of APIs.

- Open APIs (Google Calendar API)
- Proprietary APIs (Salesforce API)
- Internal APIs (an engineer writes a custom integration to connect multiple systems within a company)

You'll mainly work with open APIs when learning to code.
There are 3 main "standards" for APIs.

- REST
- SOAP
- RPC

If you're learning #webdevelopment, you'll be primarily using RESTful APIs. It is important to have standards so developers can easily learn how to use an API and don't have to learn each company's unique API standard.
Good APIs have a handful of attributes including (but not limited to):

- Simple
- Predictable (I can make the same API call many times and get the same answer)
- Backwards-compatible
- Standardized (i.e. RESTful)
- Well documented (nobody wants to reverse engineer your API)
I created a blog post and a YouTube video explaining APIs in detail. Check them out and see how you can read text off of an image with the #googlevision API

Video - https://bit.ly/35i4zy7 
Post - https://bit.ly/3nsKBqV 
You can follow @zg_dev.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled:

By continuing to use the site, you are consenting to the use of cookies as explained in our Cookie Policy to improve your experience.