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: homework-projects/guides/making-your-API-guide.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ Head on over to your GitHub account and create a repository called *`username`*
14
14
15
15
If you already have such a repository, just go on to the next step.
16
16
17
-

17
+

18
18
19
19
❗Make sure that it matches your username or it won’t work!
20
20
@@ -28,7 +28,7 @@ If you already have such a repository, just go on to the next step.
28
28
4. Once you are ready with your JSON file, add, commit and push the changes to `main` so that you have the file on your repository.
29
29
5. Head over to the repo on GitHub and verify that your file is there and that all is good.
30
30
31
-

31
+

32
32
33
33
❗Be mindful about your data format. Note wether you should use an object or an array of objects and form your file accordingly.
34
34
@@ -38,11 +38,11 @@ Now comes the fun part! You can use the JSON file in a FETCH to get and use the
38
38
39
39
Your URL for FETCH will be the raw content of the JSON file that you added. Head on to the `raw` version of your file:
40
40
41
-

41
+

42
42
43
43
Copy the URL and use it for fetching the data.
44
44
45
-

45
+

46
46
47
47
Now you have a publicly hosted API! To access this information, all you need to do is make an API call like you normally would (FETCH), parse that data (iterate through an array of objects), and then use the data in whatever way you need for your project!
0 commit comments