APITools
Test Repo for GitHub API Tools
Install / Use
/learn @ceceliacreates/APIToolsREADME
APITools
Hello! This is a test repo for various tools related to APIs (specifically so far the GitHub API).
Webinar Recording for Women Who Code Front End
Also presented at:
Talk Code-Along Instructions
If you are here for a code-along portion at a talk, welcome! I'll go over these instructions in the talk, but in case you miss something or are watching from home, here are the steps for coding along.
-
Fork this repo and clone it locally.
-
Check out the
notifications-starterbranch, then run the following commands in the project folder:
npm install
touch .env
This repository has two dependencies -- dotenv and node-fetch. Dotenv is for protecting your GitHub token and node-fetch is for making API calls. Feel free to use axios, another package, or Node to make the calls if you prefer.
-
Make sure to add
.envto your.gitginoreif you plan to push this code to GitHub. -
Once your GitHub access token is generated, save it to your
.envfile as
TOKEN=<TOKEN HERE>
- Code in
GetNotifications.jsusing the comment prompts to write a script that gets your notifications for a repository, saves any of the typesecurity-alertto a file, then marks those notifications as read.
Scripts
Run the following scripts from the master branch in the root project directory.
Create Issues from JSON
File: CreateIssueFromJSON.js
cd CreateIssuesFromJSON node CreateIssuesFromJSON.js
or
npm run issues
Pull Commits Since Given Date
File PullCommitsSinceRelease.js
cd PullCommitsSinceRelease node PullCommitsSinceRelease.js
or
npm run commits
Get Security Notifications
File GetNotifications.js
cd GetNotifications node GetNotifications.js
or
npm run notifications
GitHub Emoji Tool
File: CopyEmojis.HTML
Open CopyEmojis.HTML in any browser.
Contributing
Interested in open source? First-time contributors welcome!
Contribution Ideas:
- Create issues with feature requests or bug reports
- Add documentation
- Add error handling
- Add features to existing tools
- Add new tools
- Refactor
- Optional UIs
