Last active
December 9, 2016 19:31
-
-
Save colstrom/54d6c9112ea3d543c2ea57f40669ca5b to your computer and use it in GitHub Desktop.
github-api.fish: interacts with the GitHub API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name = github-api | |
| author = Chris Olstrom | |
| license = MIT | |
| provides = fish/functions/github-api | |
| requires | |
| fish/builtin/case | |
| fish/builtin/count | |
| fish/builtin/echo | |
| fish/builtin/end | |
| fish/builtin/function | |
| fish/builtin/return | |
| fish/builtin/switch | |
| fish/functions/https-get |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function github-api --argument path | |
| switch (count $argv) | |
| case 0 | |
| echo "usage: github-api <path>" | |
| return 100 | |
| case '*' | |
| https-get api.github.com $path | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment