What does the term "Consume an API" mean?

10

I see this term here, what would be its meaning, and how do you get it through code?

    
asked by anonymous 09.11.2016 / 15:42

2 answers

5

The word consume is synonymous with using and spending.

In the programming context it would be to use at least one of the features that the API provides, so you would be consuming it.

    
09.11.2016 / 15:47
15

It means using it :) It means that your code will access it in some way. It will invoke the available actions to request information, to have operations performed. Just write a code that makes a request on it, it is already consuming it. No matter the type of API.

Enhancement that consumes the API, it does not even need to provide data.

Today a lot of people think that API is something for the web, which is not just.

Think of a string , you need to get a snippet of it, call the method substr() , ready you're already consuming the string API.

What's the difference between API, Library, and Framework?

    
09.11.2016 / 15:48