Reputation: 569
I recently had an interview where I was asked to connect to the companies API and download a certain number of files onto my computer. I'm a student who's fairly new to programming, and I had no clue what an API was, let alone connect to one.
My Questions are:
What is an API?
and
What are some resources for me to learn how to work with API's? (I use PHP).
Thanks so much!
Upvotes: 1
Views: 137
Reputation: 20004
Lets say that I'm a company and I have products. I want to allow other people to display my products on their web site. How can I do this without giving them my database username and password and leaving a note that says "Please don't delete anything." ?
For brevity I could write a function/method that someone could invoke that returns a list of products. This method will ask that it is given some information, such as a category name. I could then write a separate method for add product if I wanted to allow it.
In other words, an API is an interface in which you can work with someone elses application in a secure manner. They control what you can and cannot do.
Upvotes: 2