Skip to content
This repository was archived by the owner on Oct 26, 2020. It is now read-only.

Farhana week8 #1015

Open
wants to merge 3 commits into
base: manchester3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions week-8/Homework/mandatory/1-practice/1-practice.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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}`?

<!-- Write your answer here -->
<!-- Write your answer here -->FarhanaFKhan, tv-show-dom-project,1

2. Describe in a sentence what this API endpoint returns when all of the fields are completed?

<!-- Write your answer here -->
<!-- Write your answer here --> It returns an object with the data about all the comments on the first PR of repo 'tv-show-dom-project'
4 changes: 3 additions & 1 deletion week-8/Homework/mandatory/2-fetch-exercise/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
2 changes: 1 addition & 1 deletion week-8/Homework/mandatory/4-programmer-humour/task.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Programmer humor
# Programmer humor

Who knew programmers could be funny?

Expand Down