Skip to content

Commit 75b4352

Browse files
authored
fixed spelling mistakes
1 parent 555608c commit 75b4352

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

README.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Welcome! Tonight we'll be creating a random advice generator (fun animations inc
44
Feel free to ask lots of questions and build on this project! Follow the steps below to get going:
55

66
## 1. Download a code editor (if you don't already have one).
7-
A code editor will make it easier for you to look at and edit the code for your mad libs app.
7+
A code editor will make it easier for you to look at and edit the code for your app.
88

99
Here are some great **open source** code editor that is compatible with Windows, Mac, and Linux:
1010
- **[Visual Studio Code](https://code.visualstudio.com/download)**: Microsoft's code editor with a super sleek user interface and terminal integration.
@@ -48,20 +48,18 @@ Clone your repo
4848

4949
[![Screen-Shot-2019-10-29-at-3-48-04-PM.png](https://i.postimg.cc/5tDDMCtF/Screen-Shot-2019-10-29-at-3-48-04-PM.png)](https://postimg.cc/5HqsBjLx)
5050

51-
52-
53-
5451
**If you'd like to test the starter code (and test your changes throughout) double click `index.html`. Refresh the page to view changes as you make them.**
5552

53+
5654
## 3. Open the project in your code editor.
5755

58-
You'll see one file called `index.html` and folder called `js`. `index.html` is the file that constitutes the homepage of the website. The `js` folder is where all **Javascript** files will be kept. As of now, we only have one Javascript file, `main.js`, which is our main script for the website. There is also a **style.css** file that contains some minor styling for the webpage. Feel free to ignore or play around with it!
56+
You'll see one file called `index.html` and folder called `js`. `index.html` is the file that constitutes the homepage of the website. The `js` folder is where all **Javascript** files will be kept. As of now, we only have one Javascript file, `main.js`, which is our main script for the website. There is also a **style.css** file that contains some minor styling for the webpage. Feel free to ignore it or play around with it!
5957

6058
## 4. Check out the Advice Slip API
6159

6260
[Click on this link to go to the API](http://api.adviceslip.com/) we will be using tonight.
6361

64-
While there are hundreds of APIs to use on the internet, many are considered "consumption-only" and only allow you to make `GET` requests. In order to make `POST`, `PUT`, or `DELETE` requests, many APIs require some kind of authentification. That will not be covered in this tutorial but we highly encourage you to explore such APIs like Twitter or Spotify's API!
62+
While there are hundreds of APIs to use on the internet, many are considered "consumption-only" and only allow you to make `GET` requests. In order to make `POST`, `PUT`, or `DELETE` requests, many APIs require some kind of authentication. That will not be covered in this tutorial but we highly encourage you to explore such APIs like Twitter or Spotify's API!
6563
Check out the **Random Advice** section of the API. The request we will be making is `GET` and the url is what will be making the request to get the data.
6664
Now look at the **Slip Object** section. This tells us what fields make up the object that will be returned in the reponse. We will use these fields to access the advice string so we can display it.
6765

@@ -80,7 +78,7 @@ At line 1 write: `const url = 'https://api.adviceslip.com/advice'`
8078
This url will change depending on what information you're trying to get. For this project we want random advice but we could also get just one specific piece of advice. We would do this by calling `https://api.adviceslip.com/advice/{slip_id}` instead.
8179

8280
Next, we want to make our request. We do this by calling `fetch(url)`. This method is part of *another* API, called [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). Fetch provides a JavaScript interface for accessing and manipulating parts of the HTTP pipeline, such as requests and responses.
83-
`fetch()` provides a logical way to fetch resources asynchronously across the network. It's API inception!!
81+
`fetch()` provides a logical way to get resources asynchronously across the network. It's API inception!!
8482

8583
Inside the `getAdvice()` function after `confetti.start();` we want to write:
8684
```
@@ -93,7 +91,7 @@ fetch(url)
9391
```
9492
9593

96-
`response => response.json()` transforms the data into a JSON object and `function(advice)` handles displaying the data. We access the advice (string) of the JSON object by calling advice.slip.advice. This becomes text that we now can put inside our modal element, which we do by writing `document.getElementById('advice').innerHTML = adviceData;`
94+
`response => response.json()` transforms the data into a JSON object and `function(advice)` handles displaying the data. We access the advice (string) of the JSON object by calling `advice.slip.advice`. This becomes text that we now can put inside our modal element, which we do by writing `document.getElementById('advice').innerHTML = adviceData;`
9795

9896
Finally refresh the page and watch the magic happen!
9997

0 commit comments

Comments
 (0)