You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/01_course_intro/04_what_is_rest_api/README.md
+7-3Lines changed: 7 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -62,9 +62,9 @@ That data might look like this:
62
62
63
63
### The purpose of APIs
64
64
65
-
Okay, we've learned that we can make a Flask app and expose certain functions to the public by using endpoints. Clients can then make requests (we'll learn how later), and get data.
65
+
We've learned that we can make a Flask app and expose certain functions to the public by using endpoints. Clients can then make requests (we'll learn how later), and get data.
66
66
67
-
Clients can also send data, which the functions can use.
67
+
Clients can also send data, which the Flask functions can use.
68
68
69
69
But _why_? If you want to use certain functions, why not just code them in your application?
70
70
@@ -74,10 +74,14 @@ Let's say you want to build a weather app.
74
74
75
75
You could try to install sensors at the top of your house, connect them directly to the computer running your code, and then offer weather info based on what the sensors say...
76
76
77
-
Or you could request weather data from the OpenWeatherMap API, just as tens of thousands of other devices do.
77
+
Or you could request weather data from the OpenWeatherMap API, just as tens of thousands of other devices do.
78
78
79
79
Much easier, and all you have to do is make a request to the API!
80
80
81
+
### What is a client?
82
+
83
+
An API client can be any device, such as a web app or a mobile app.
84
+
81
85
### Making an API for your own consumption
82
86
83
87
Make software companies make APIs that only they use (so they aren't fully public).
0 commit comments