https://github.com/djdeveloperr/hacktoberapi
Simple API to check eligibility of Repositories and Pull Requests for Hacktoberfest.
https://github.com/djdeveloperr/hacktoberapi
api hacktoberfest
Last synced: 3 months ago
JSON representation
Simple API to check eligibility of Repositories and Pull Requests for Hacktoberfest.
- Host: GitHub
- URL: https://github.com/djdeveloperr/hacktoberapi
- Owner: DjDeveloperr
- Created: 2020-10-19T11:33:42.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-19T11:49:12.000Z (over 4 years ago)
- Last Synced: 2025-01-22T02:35:28.594Z (5 months ago)
- Topics: api, hacktoberfest
- Language: JavaScript
- Homepage: https://hf.djd.wtf
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hacktober API
Simple API to check eligibility of Repositories and Pull Requests for Hacktoberfest.API is hosted [here](https://hf.djd.wtf) at the moment.
## Setup
`npm install` and `npm start`
You also need a `.env` file with your Github Access Token (`TOKEN`).## API Endpointers
```http
GET /api/repo/:user/:repo
```
### Parameters
* user: string - Owner of the Repository
* repo: string - Repository Name### Response
Sends JSON with following properties if everything goes right:
* user: string - Owner of the Repository
* repo: string - Repository Name
* eligibile: boolean - Whether Repository is eligibile or not
If not found, a Error response with code 404 is sent:
```json
{
"code": 404,
"msg": "Not Found"
}
``````http
GET /api/pr/:user/:repo/:pr_num
```
### Parameters
* user: string - Owner of the Repository
* repo: string - Repository Name
* pr_num: number - Pull Request's Number### Response
Sends JSON with following properties if everything goes right:
* user: string - Owner of the Repository
* repo: string - Repository Name
* pr_num: number - Pull Request's Number
* merged?: boolean - Whether PR is merged or not
* repoEligible?: boolean - Whether PR's Repository is eligibile or not
* eligibile?: boolean - Whether Repository is eligibile or not
* invalid?: boolean - Whether Repository is invalid (Spam) or not
Else if something goes wrong, sends a similar error response like above.### Note
I'm not so good with docs, you can PR improvments to Docs and Code both :)