diff --git a/week-8/Homework/mandatory/1-practice/1-practice.md b/week-8/Homework/mandatory/1-practice/1-practice.md index 02aa34989..d5d23f6ef 100644 --- a/week-8/Homework/mandatory/1-practice/1-practice.md +++ b/week-8/Homework/mandatory/1-practice/1-practice.md @@ -5,6 +5,7 @@ This week's concepts can be challenging, therefore let's get an easy introductio You can ignore anything to do with `XMLHttpRequest` - [FreeCodeCamp](https://www.freecodecamp.org/news/a-practical-es6-guide-on-how-to-perform-http-requests-using-the-fetch-api-594c3d91a547/) +(done) ## Code along @@ -20,12 +21,12 @@ Enjoy! The following endpoint is publicly available from Github - GET https://api.github.com/repos/{owner}/{repo}/pulls/{pull_number}/comments + GET https://api.github.com/repos/FarhanaFKhan/tv-show-dom-project/pulls/1/comments 1. What would you put in the following fields? `{owner}`, `{repo}`, `{pull_number}`? - +FarhanaFKhan, tv-show-dom-project,1 2. Describe in a sentence what this API endpoint returns when all of the fields are completed? - + It returns an object with the data about all the comments on the first PR of repo 'tv-show-dom-project' diff --git a/week-8/Homework/mandatory/2-fetch-exercise/exercise.js b/week-8/Homework/mandatory/2-fetch-exercise/exercise.js index fb3a39c2a..99f318c4c 100644 --- a/week-8/Homework/mandatory/2-fetch-exercise/exercise.js +++ b/week-8/Homework/mandatory/2-fetch-exercise/exercise.js @@ -17,10 +17,12 @@ Open index.html in your browser. Every time you refresh the page, a different greeting should be displayed in the box. */ -fetch('*** Write the API address here ***') +fetch('https://codeyourfuture.herokuapp.com/api/greetings') .then(function(response) { return response.text(); }) .then(function(greeting) { // Write the code to display the greeting text here + let greetingTextEL = document.querySelector('#greeting-text'); + greetingTextEL.innerText = greeting; }); \ No newline at end of file diff --git a/week-8/Homework/mandatory/4-programmer-humour/task.md b/week-8/Homework/mandatory/4-programmer-humour/task.md index d47b0902e..1e888d54c 100644 --- a/week-8/Homework/mandatory/4-programmer-humour/task.md +++ b/week-8/Homework/mandatory/4-programmer-humour/task.md @@ -1,4 +1,4 @@ -# Programmer humor +# Programmer humor Who knew programmers could be funny?