From d0bc0b06e13ae7036225f439706c9a5fca9ddb2d Mon Sep 17 00:00:00 2001 From: Stephen Brown <22478178+sdbrown2@users.noreply.github.com> Date: Mon, 24 Jun 2019 13:45:29 -0500 Subject: [PATCH 1/3] Update README.md --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9c708959..c56935a7 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,8 @@ Create a React application that retrieves and displays the user repositories and Up to you, probably it should include an input to enter the username, one area to display the repositories of the user and another area to display the organisations ## Retrieving data -To make things easier we have commited a github-api.js file with the REST APIs needed to retrieve the information. +Use the GitHub v4 GraphQL API: https://developer.github.com/v4/ +We recommend using Appollo Client. ## Bootstrapping the project Up to you, we recommend [create-react-app](https://github.com/facebook/create-react-app). @@ -18,14 +19,12 @@ Copy this repository to a repository on your name and add the solution there. It ## Bonus (don't need to be in the below specific order) * Use ES6 syntax including arrow functions, destructuring and async/await -* Adding types with Flow or Typescript * Adding a spinner when information is loading * Deal with errors coming from the backend * Some sort of Unit Test * Some sort of Integration Test * Having a nice UI using a components library (Bootstrap?) * Divide the application in different pages and use a router -* Adding state management (additional Bonus if using Mobx or Mobx-State-Tree instead of Redux) * Show common tools used for you daily development environment (linters, code formatter, git workflow, docker and so on) * Deploy the project somewhere From 9c3bccc167ea7248af2219064e22e99189474295 Mon Sep 17 00:00:00 2001 From: Stephen Brown <22478178+sdbrown2@users.noreply.github.com> Date: Mon, 24 Jun 2019 13:46:13 -0500 Subject: [PATCH 2/3] removing old api reference --- github-api.js | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 github-api.js diff --git a/github-api.js b/github-api.js deleted file mode 100644 index c0d58cf1..00000000 --- a/github-api.js +++ /dev/null @@ -1,23 +0,0 @@ -import axios from "axios"; - -// Documentation is at https://developer.github.com/v3/ -const BASE_URL = "https://api.github.com/"; - -export { getRepos, getUserData }; - -function getRepos(username) { - const url = `${BASE_URL}/users/${username}/repos?per_page=250`; - return axios.get(url).then(response => response.data); -} - -function getUserData(username) { - return axios - .all([ - axios.get(`${BASE_URL}/users/${username}`), - axios.get(`${BASE_URL}/users/${username}/orgs`) - ]) - .then(([user, orgs]) => ({ - user: user.data, - orgs: orgs.data - })); -} From 89cb0e12252ce09e6b00ff0333d62dc5d4e717ea Mon Sep 17 00:00:00 2001 From: Stephen Brown <22478178+sdbrown2@users.noreply.github.com> Date: Mon, 24 Jun 2019 14:24:50 -0500 Subject: [PATCH 3/3] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c56935a7..ec41e8e6 100644 --- a/README.md +++ b/README.md @@ -5,17 +5,17 @@ This is a small project for a react interview. Create a React application that retrieves and displays the user repositories and organisations in Github. ## UX/UI -Up to you, probably it should include an input to enter the username, one area to display the repositories of the user and another area to display the organisations +Up to you, probably it should include an input to enter the username, one area to display the repositories of the user and another area to display the organisations. ## Retrieving data Use the GitHub v4 GraphQL API: https://developer.github.com/v4/ -We recommend using Appollo Client. +We recommend using Apollo Client. ## Bootstrapping the project Up to you, we recommend [create-react-app](https://github.com/facebook/create-react-app). ## Submitting the solution -Copy this repository to a repository on your name and add the solution there. It should be clear how to build and run the project locally. +Copy this repository to a repository on your own github account and add the solution there. Show good branching and committing strategy, open a pull request with the solution, and add Sean as a reviewer (@seanmctex). It should be clear how to build and run the project locally. ## Bonus (don't need to be in the below specific order) * Use ES6 syntax including arrow functions, destructuring and async/await