This project is a command-line HTTP client that will request the avatars for all contributors to a given project on GitHub, and download them to disk.
Given a GitHub repository name and owner, download all the contributors' profile images and save them to a subdirectory, avatars/
.
Clone this repository to your local disk:
git clone https://github.com/fiveache/GitHub-Avatar-Downloader.git
cd to directory:
cd Github-Avatar-Downloader
Install dependencies
npm install
Generate your GitHub Personal Access Token. In the root directory of project, create a new directory called secret
:
mkdir secret && cd secret
Create a new file called tokens.js
:
touch tokens.js
In tokens.js
, paste the following code, replacing <GitHub Access Token>
with your GitHub Personal Access Token:
const gitHubKey = '<GitHub Access Token>';
module.exports.gitHubKey = gitHubKey;
cd back to root of project:
cd ..
This program should be executed from the command line, in the following manner:
node download_avatars.js <user> <repository>
- Break down larger problems into smaller steps
- work incrementally towards your solution.
- HTTP
- APIs
- JSON
- Node File System (fs)
- JavaScript and Node
- ES6 Syntax
- JSDoc
- Documentation