A Restful API able to retrieve information about github repositories, and to present them in a simple form to the user.
git clone https://github.com/teomurgi/githubber.git
cd githubber
npm i
githubber is supported on Linux and Mac OS X. It has been tested with Node.js 6.6.0.
From the project folder:
Usage: bin/githubber <keys_file>
Options:
-h, --help output usage information
-V, --version output the version number
It is a text file containing the enabled apikeys. All the request towards githubber must have a special header apikey contining one of the allowed keys listed in this file.
Githubber listens on port 3000.
Provides a generic list of repositories.
curl --header "apikey:<YOUR_APIKEY>" http://<HOSTNAME>:3000/repos
Provides details about a particular repository.
curl --header "apikey:<YOUR_APIKEY>" http://<HOSTNAME>:3000/repos/<REPOSITORY_ID>
Gets all the repos matching the provided query. Such query must be complieant with the github query format.
curl --header "apikey:<YOUR_APIKEY>" http://<HOSTNAME>:3000/repos/search/<YOUR_QUERY>
The authentication that has been implemented is very simple. It has several weaknesses:
- The keys are stored unencrypted on the filesystem
- Now githubber supports only http, thus the apikeys travel not encrypted, so anyone can steal them
- They do not get renewed automatically, this is unsecure too
Licensed under MIT.