Skip to content

Instantly share code, notes, and snippets.

@colstrom
Last active December 9, 2016 19:31
Show Gist options
  • Select an option

  • Save colstrom/54d6c9112ea3d543c2ea57f40669ca5b to your computer and use it in GitHub Desktop.

Select an option

Save colstrom/54d6c9112ea3d543c2ea57f40669ca5b to your computer and use it in GitHub Desktop.
github-api.fish: interacts with the GitHub API
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
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