You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Week1/MAKEME.md
+2-24Lines changed: 2 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -63,39 +63,17 @@ GitHub API documentation: [List organization repositories](https://developer.git
63
63
64
64
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).
65
65
66
-
#### Get repository information
67
-
68
-
You can get information about a specific repository through this API endpoint:
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
79
67
80
68
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.
81
69
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.
92
71
93
72
### Refinements
94
73
95
74
- 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`).
96
75
- Make sure the link opens in a new tab.
97
76
98
-
99
77
### Important
100
78
101
79
- 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:
0 commit comments