Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Flask REST API Resourceful Blueprints Blueprints

Radosław Kalina
Radosław Kalina
13,085 Points

When we should use API ?

I still do not get what exacly API is. (I saw course about it at Treehouse and few more from the internet). In last flask course ("Building a social network..") we made an app where users can make a new posts, saw this posts etc. Can somebody explain me what is a difference between that social app and app from this course. Why we use API in this course and why we do not use it in previous course ? When we want to build API and when we do not need it ?

1 Answer

Dmitry Polyakov
Dmitry Polyakov
4,961 Points

You have to use API to be able to get data from a server. APIs have various data. For example, if you want to get current weather you can find some weather API, send request to it and get info on actual weather at some location.

Radosław Kalina
Radosław Kalina
13,085 Points

I am very grateful for you answer becouse this think is in my mind another day. Ok thats true, same with log in on the other page using facebook account I guess. But in this course we will build an app where people can add a course and review, same as for example adding post on our wall on facebook. And I do not get it I guess. Maybe I think bad about the think which we build in this course. Can you explain where is a mistake in my thinking ? Now I do not see a diference between this app and app from Building a social network and for me it is not something which is build for other (like in this example with actual wether). Where is a mistake in my thinking ?