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

Skip to content

Commit 9a7c55a

Browse files
committed
updated homework
1 parent 32a2229 commit 9a7c55a

File tree

2 files changed

+4
-26
lines changed

2 files changed

+4
-26
lines changed

Week1/MAKEME.md

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -63,39 +63,17 @@ GitHub API documentation: [List organization repositories](https://developer.git
6363

6464
Note the query string `?per_page=100`. If you don't specify this query string you will only get the first 30 repositories (the default `per_page` is 30 and HYF has more than 30 - but less than 100).
6565

66-
#### Get repository information
67-
68-
You can get information about a specific repository through this API endpoint:
69-
70-
```
71-
https://api.github.com/repos/HackYourFuture/[repositoryName]
72-
```
73-
74-
You should replace `[repositoryName]` with the actual name of the repository.
75-
76-
GitHub API documentation: [Get](https://developer.github.com/v3/repos/#get)
77-
78-
### Get contributor information
66+
#### Get contributor information
7967

8068
The response object that is returned by GitHub from the request to get repository information includes a property with the `contributors_url`. Use the value of this property to make a new request to GitHub to obtain a list of contributors.
8169

82-
Note that, as a result of selecting a repository from the `<select>` element, your code must make two XMLHttpRequests, one after the other:
83-
84-
1. A first request to obtain repository information.
85-
2. A second request using the `contributors_url` obtained from (1) to get a list of contributor information.
86-
87-
Both requests must be done asynchronously.
88-
89-
Making two XMLHttpRequests in a row, where the second requests depends on the response of the first request is part of the assignment. While it is possible to figure out beforehand what the value of the `contributors_url` will be (by carefully reading the documentation), and subsequently make two independent XMLHttpRequests, this is not what is expected.
90-
91-
In the lecture we developed some utility functions to simplify making XMLHttpRequests and creating and manipulating HTML elements. You are free to copy and use these utility functions, but if you do we expect that you can explain how they work.
70+
In the lecture we developed some utility functions to simplify making XMLHttpRequests (function `fetchJSON()`) and creating and manipulating HTML elements (function `createAndAppend()`). You are free to copy and use these utility functions, but if you do we expect that you can explain how they work.
9271

9372
### Refinements
9473

9574
- Make all the repositories link to their own page in GitHub. Use the value of the key: `name` to make this work (hint: GitHub urls always look like this https://api.github.com/repos/HackYourFuture/[repositoryName] where [repositoryName] would be replaced by the actual `name` of the repository, for example `CommandLine`).
9675
- Make sure the link opens in a new tab.
9776

98-
9977
### Important
10078

10179
- Do not duplicate code! This is especially important for making requests since we are making multiple ones with different urls and we want to do different actions based on the call we are making. Here are some handles to get you started:

Week3/MAKEME.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ _Deadline Monday_
2121

2222
## Step 3: Fix issues
2323

24-
_Deadline Thursday_
24+
_Deadline Wednesday_
2525

2626
- Fix the issues from the last weeks and make sure you explain how you fixed the issue in a comment (or commit message)
2727

2828
## Step 4
2929

30-
_Deadline Wednesday_
30+
_Deadline Thursday_
3131

3232
- Sort the list the repositories in the `<select>` by name (case-insensitive).
3333
- Refactor your app to replace `.then()` and `.catch()` with `async`/`await` and `try...catch`.

0 commit comments

Comments
 (0)