GitHub SDK is kind of Software Development Kit. In short, GitHub SDK is reflection of selected user interface functions on the GitHub website using JavaScript and GitHub API.
The whole project is built according to Test Driven Development methodology. It is a development process in which software requirements and functionalities are firstly converted to test cases. Next step is to build an implementation that passess both software requirement and test case. After all there is a code refactoring. It is so called 'red-green-refactor' cycle.
Follow the steps below to run the project locally.
- Clone the project using
git clone- Go to the project directory and install dependencies
npm i- in root directory create .env file with code as below - enter your details:
USERNAME='put-your-username-here'
TOKEN='put-your-personal-token-here'-
to create GH personal token, click here
-
Run the tests
npm run test-watch- Start development mode
npm start- Exemplary use of GitHub SDH is ready at port 8080 (by default, the GitHubSDK will show your public repositories)
http://localhost:8080/- After starting, GitHubSDK will automatically verify the correctness of the entered data and inform about any errors
- to see another user's public repositories, assign username as a string to the
specifiedUser.usernameinspecifiedUser.jsfile
const specifiedUser = {
username: 'username-as-string'
}- you can check any of the functionalities e.g. using
console.logor using in your project (like here - GitHub SDK is used to show public repositories)
GitHubSDK.getUserInfo('username')
.then(data => onsole.log(data))
.catch(err => console.error(err))
- get information about
- user
- user's public repositories
- commits to repository
- user's followers/following
- create/delete repo
- send/remove invitation
Special thanks to my Mentor - devmentor.pl for providing me with the task and code review.
