GitHub API Demo application container
105
GitHub API Demo is a simple Golang CLI application displaying public Gists for a given GitHub username.
To install GitHub API Demo, please use the following methods (sorted by ease of use, from top to bottom). Each installation method requires an access to a system terminal (ie. Terminal.app on MacOS Intel/AppleSilicon) and some terminal proficiency.
The app is used directly from the terminal. As a minimum, it requires a flag with a GitHub account username.
Note, how different installation methods are used in examples below.
$ ./gh-api-demo -acc bartekrutkowski
https://gist.github.com/291f2837c2a6e8eeae29
https://gist.github.com/9ef3dd3ed40867717fec
$
Additionally, either -raw flag for complete JSON output of the Gists objects or -table flag for selected fields output in ASCII table format can be passed.
$ docker run bartekrutkowski/gh-api-demo:latest -acc bartekrutkowski -table
+----------------------------------------------------------------------------------------------------------+
| GitHub Gists for user bartekrutkowski |
+---+----------------------------------------------+-----------------------+-------------------------------+
| # | URL | DESCRIPTION | DATE |
+---+----------------------------------------------+-----------------------+-------------------------------+
| 1 | https://gist.github.com/291f2837c2a6e8eeae29 | OS X Homebrew cleanup | 2016-02-07 18:53:11 +0000 UTC |
| 2 | https://gist.github.com/9ef3dd3ed40867717fec | JSON2PDNS | 2015-12-09 15:05:27 +0000 UTC |
+---+----------------------------------------------+-----------------------+-------------------------------+
$
Currently there is one required and two optional flags. The optional flags are mutually exclusive, only one of them can be used at once.
-acc string
GitHub account username (required)
-raw
Display full output in raw JSON format (optional)
-table
Display stripped output in table format (optional)
The source code for this Docker container and the application in it can be found on GitHub.
While I retain the author's rights for the application, the entire repository and all its artifacts are relased under the BSD 3-Clause license and is free to use.
Content type
Image
Digest
Size
4 MB
Last updated
over 4 years ago
docker pull bartekrutkowski/gh-api-demo