Skip to content
This repository was archived by the owner on Aug 17, 2024. It is now read-only.

Commit d23c02a

Browse files
authored
Merge branch 'master' into task-demo-screenshots
2 parents a7c9801 + 2e14b89 commit d23c02a

File tree

1 file changed

+34
-10
lines changed

1 file changed

+34
-10
lines changed

README.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# My Resume
22

33
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)
55
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).
66

77
## Github API
@@ -10,11 +10,12 @@ Github provides an **API** that provides a way for developers to retrieve inform
1010

1111
The documentation for the `repos` endpoint is available on: [https://developer.github.com/v3/repos/](https://developer.github.com/v3/repos/)
1212

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.
1414

1515
**Now to the requirements.**
1616

1717
## Part 1: My Github Page
18+
1819
### Requirement 1: Show my Repos
1920
**Given** I am on the Resume site
2021
**When** I click on `My Github` link
@@ -30,7 +31,7 @@ The documentation for the `repos` endpoint is available on: [https://developer.g
3031
**When** I click on `My Github` link
3132
**Then** I should be shown the number of repos in my Github account (in place of the `X`)
3233

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:
3435

3536
![tasks 1-3 demo](./homework_assets/tasks1-3demo.png)
3637

@@ -40,44 +41,67 @@ GET [https://api.github.com/repos/codeyourfuture/js-exercises/pulls](https://api
4041

4142
For the below 3 tasks, you'll need to work in: `pull-requests.html` & `pull-requests.js`
4243

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.
4349
4450
### Requirement 4: Show ALL Pull Requests
4551
**Given** I am on the Resume site
46-
**When** I click on `My Pull Requests` page
52+
**When** I click on `Pull Requests` link
4753
**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)
4955

5056
### Requirement 5: Show Only My Pull Requests
5157

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.
5359

5460
### Requirement 6: Search for my friend's Pull Requests
5561

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.
5763

5864
**Given** I am on the the Pull Requests page
5965
**When** I enter a *github user* in the *search box*
6066
**Then** I should be shown a list of *Pull Requests title* for that User only
6167

6268
![task 6 demo](./homework_assets/task6demo.png)
6369

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+
6480
## Part 3: Update My Github Page to show other Github user's repos
6581

6682
### Requirement 7: Display someone else's repos in My Github
6783

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.
6985

7086
**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*
7288
**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
7490

7591
(stretch goal: if the search box is empty then it should default to my User)
7692

7793
> You will need to update the code in `my-github.js` to finish this final task.
7894
7995
![task 7 demo](./homework_assets/task7demo.png)
8096

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+
81105
## Bonus Task: Random API
82106
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
83107

0 commit comments

Comments
 (0)