Created
January 20, 2014 00:08
-
-
Save codebycliff/8512792 to your computer and use it in GitHub Desktop.
Bash functions for interacting with the freshmeat 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
#!/bin/bash | |
FRESHMEAT_TOKEN=xtJ4zwGPM14iBmKnledd | |
DATA="auth_code=$FRESHMEAT_TOKEN" | |
ROOT="http://freshmeat.net" | |
function get { | |
[ -z "$1" ] && echo "Error: Must supply request path." && return | |
echo $(curl -G -d $DATA $ROOT/${1}) | |
} | |
function get_project () { | |
echo $(get projects/${1}.${2-json}) | |
} | |
function get_tags () { | |
echo $(get tags/all.${1-json}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment