Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ae8ddda

Browse files
author
Noer Paanakker
committed
replaced apis in exercises w1
1 parent 9b69c26 commit ae8ddda

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

Week1/MAKEME.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,38 +17,40 @@ This week's concepts can be challenging, therefore let's get an easy introductio
1717

1818
> Inside of your `JavaScript3` fork and inside of the `Week1` folder, create a folder called `homework`. Inside of that folder, create a folder called `js-exercises`. For all the following exercises create a new `.js` file in that folder (3 files in total). Make sure the name of each file reflects its content: for example, the filename for exercise one could be placeKitten.js.
1919
20-
**Exercise 1: Place the kitten**
20+
**Exercise 1: Who do we have here?**
2121

22-
Who doesn't love kittens on their screen?
22+
Wouldn't it cool to make a new friend with just the click of a button?
2323

24-
Write an function that makes an API call to https://wwww.placekitten.com/api
24+
Write a function that makes an API call to `https://www.randomuser.me/api`
2525

26-
- Inside the same file write two programs: one with `XMLHttpRequest`, and the other with `axios`
27-
- Each function should make an API call to the given endpoint: `https://wwww.placekitten.com/api`
26+
- Inside the same file write two functions: one with `XMLHttpRequest`, and the other with `axios`
27+
- Each function should make an API call to the given endpoint: `https://www.randomuser.me/api`
2828
- Log the received data to the console
2929
- Incorporate error handling
3030

31-
**Exercise 2: Who do we have here?**
31+
**Exercise 2: Programmer humor**
3232

33-
Wouldn't it cool to make a new friend with just the click of a button?
33+
Who knew programmers could be funny?
3434

35-
Write a function that makes an API call to https://www.randomuser.me/api
35+
Write an function that makes an API call to `https://xkcd.com/info.0.json`
3636

37-
- Inside the same file write two functions: one with `XMLHttpRequest`, and the other with `axios`
38-
- Each function should make an API call to the given endpoint: `https://www.randomuser.me/api`
37+
- Inside the same file write two programs: one with `XMLHttpRequest`, and the other with `axios`
38+
- Each function should make an API call to the given endpoint: `https://xkcd.com/info.0.json`
3939
- Log the received data to the console
40+
- Render the `img` property into an `<img>` tag in the DOM
4041
- Incorporate error handling
4142

42-
**Exercise 3: Photo gallery**
43+
**Exercise 3: Dog photo gallery**
4344

44-
Let's make a randomized photo gallery!
45+
Let's make a randomized dog photo gallery!
4546

46-
Write a function that makes an API call to https://picsum.photos/400
47+
Write a function that makes an API call to `https://dog.ceo/api/breeds/image/random`. It should trigger after clicking a button in your webpage. Every time the button is clicked it should append a new dog image to the DOM.
4748

4849
- Create an `index.html` file that will display your random image
49-
- Write two programs: one with `XMLHttpRequest`, and the other with `axios`
50-
- Each function should make an API call to the given endpoint: `https://picsum.photos/400`
51-
- After receiving the data, render it to the page in a `<img>`
50+
- Add 2 `<button>` and 1 `<ul>` element, either in the HTML or through JavaScript
51+
- Write two versions for the button functionality: one with `XMLHttpRequest`, and the other with `axios`
52+
- When any one of the 2 buttons is clicked it should make an API call to `https://dog.ceo/api/breeds/image/random`
53+
- After receiving the data, append to the `<ul>` a `<li>` that contains an `<img>` element with the dog image
5254
- Incorporate error handling
5355

5456
## **3. Code along**

0 commit comments

Comments
 (0)