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
{{ message }}
This repository was archived by the owner on Aug 17, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+34-10Lines changed: 34 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# My Resume
2
2
3
3
1. Fork and Clone this repo
4
-
2.run`npm install` then `npm start` (don't worry if you don't understand these commands now, we will explain them in Node module)
4
+
2.Run`npm install` then `npm start` (don't worry if you don't understand these commands now, we will explain them in Node module)
5
5
3. When you run `npm start`, your browser should open the webpage immediately with hot reload enabled (i.e. when you change files, they will automatically be reflected on the page).
6
6
7
7
## Github API
@@ -10,11 +10,12 @@ Github provides an **API** that provides a way for developers to retrieve inform
10
10
11
11
The documentation for the `repos` endpoint is available on: [https://developer.github.com/v3/repos/](https://developer.github.com/v3/repos/)
12
12
13
-
- Try to open this URI on the browser https://api.github.com/users/codeyourfuture/repos. What do you get back? Try changing *codeyourfuture* to your Github username, and see if you get back your list of repositories.
13
+
- Try to open this URI on the browser [https://api.github.com/users/codeyourfuture/repos](https://api.github.com/users/codeyourfuture/repos). What do you get back? Try changing *codeyourfuture* to your Github username, and see if you get back your list of repositories.
14
14
15
15
**Now to the requirements.**
16
16
17
17
## Part 1: My Github Page
18
+
18
19
### Requirement 1: Show my Repos
19
20
**Given** I am on the Resume site
20
21
**When** I click on `My Github` link
@@ -30,7 +31,7 @@ The documentation for the `repos` endpoint is available on: [https://developer.g
30
31
**When** I click on `My Github` link
31
32
**Then** I should be shown the number of repos in my Github account (in place of the `X`)
32
33
33
-
> The page `my-github.html` under the folder *pages* has a reference to the script `my-github.js` and the CSS file `my-github.css`. These are the files that you will need to change for these tasks.
34
+
For the above requirements, you need to use the API:
@@ -40,44 +41,67 @@ GET [https://api.github.com/repos/codeyourfuture/js-exercises/pulls](https://api
40
41
41
42
For the below 3 tasks, you'll need to work in: `pull-requests.html` & `pull-requests.js`
42
43
44
+
> GET https://api.github.com/users/*YOUR GITHUB USERNAME*/repos
45
+
46
+
Where do I write the code for Part 1 requirements?
47
+
48
+
> Under the folder *pages* there is the HTML page `my-github.html`. Inside this file there are references to the script `my-github.js` and the CSS file `my-github.css`. These are the files that you will need to change for Part 1 tasks.
43
49
44
50
### Requirement 4: Show ALL Pull Requests
45
51
**Given** I am on the Resume site
46
-
**When** I click on `My Pull Requests`page
52
+
**When** I click on `Pull Requests`link
47
53
**Then** I should be shown a list of all *Pull Requests title* as a link
48
-
**AND** the link should take me to the Pull Request on Github (use `html_url` property)
54
+
**AND** the link should take me to the Pull Request on Github (use `html_url` property from the API response)
49
55
50
56
### Requirement 5: Show Only My Pull Requests
51
57
52
-
Update the previous requirement to only show your Pull Requests. Look at the `JSON` response and think how you can _filter_ the response
58
+
Update the code your wrote for the previous requirement to only show your own Pull Requests. Look at the `JSON` response and think how you can _filter_ the response.
53
59
54
60
### Requirement 6: Search for my friend's Pull Requests
55
61
56
-
Update the previous page to add a `Search input`. This allows the user to enter a Github user, and while they are searching, we should _filter_ the displayed list of Pull Requests to only show that user's Pull Requests.
62
+
Add a `Search input` on the `My Pull Requests` page. This allows the user to enter a Github username, and while they are searching, we should _filter_ the displayed list of Pull Requests to only show that user's Pull Requests.
57
63
58
64
**Given** I am on the the Pull Requests page
59
65
**When** I enter a *github user* in the *search box*
60
66
**Then** I should be shown a list of *Pull Requests title* for that User only
61
67
62
68

63
69
70
+
For the above requirements, you need to use the API:
71
+
72
+
> GET [https://api.github.com/repos/codeyourfuture/js-exercises/pulls](https://api.github.com/repos/codeyourfuture/js-exercises/pulls)
73
+
74
+
> hint: This request lists all the pull requests against js-exercises. How can you show only the ones that related to your Github username (How can you _filter_ the list).
75
+
76
+
Where do I write the code for Part 2 requirements?
77
+
78
+
> The file `pull-requests.js` is where you need to write the JavaScript to peform these requirements.
79
+
64
80
## Part 3: Update My Github Page to show other Github user's repos
65
81
66
82
### Requirement 7: Display someone else's repos in My Github
67
83
68
-
Update the **My Github** page to add a `Search input` and a `Search button`. This allows the user to enter a Github user, and when they click **Search** then the page should display The Pull Requests for that user.
84
+
Update the **My Github** page to add a `Search input` and a `Search button`. This allows the user to enter a Github username, and when they click **Search** then the page should display the Pull Requests for that user.
69
85
70
86
**Given** I am on *My Github* page
71
-
**When** I enter a *github user* in the *search box*
87
+
**When** I enter a *github username* in the *search box*
72
88
**And** I click Enter
73
-
**Then** I should be shown a list of the repos for that User
89
+
**Then** I should be shown a list of the repos for that user
74
90
75
91
(stretch goal: if the search box is empty then it should default to my User)
76
92
77
93
> You will need to update the code in `my-github.js` to finish this final task.
78
94
79
95

80
96
97
+
For the above requirements, you need to use the API:
98
+
99
+
> GET https://api.github.com/users/*A GITHUB USERNAME*/repos
100
+
101
+
Where do I write the code for Part 3 requirements?
102
+
103
+
> You will need to update the code in `my-github.js` to finish these tasks.
104
+
81
105
## Bonus Task: Random API
82
106
Pick any random API from https://github.com/toddmotto/public-apis (**only those that don't require authentication (have Auth No)**) and create a page to use the API
0 commit comments