Skip to content

Instantly share code, notes, and snippets.

@mambocab
Created May 18, 2015 17:22
Show Gist options
  • Save mambocab/dd1a401e1303d257afad to your computer and use it in GitHub Desktop.
Save mambocab/dd1a401e1303d257afad to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
usage() { echo "usage: `basename $0` <yo username>" ; }
if [ -z "$YO_API_KEY" ] ; then
echo "No YO_API_KEY in environment."
echo "Get a key from https://dev.justyo.co/"
usage
exit 1
fi
if [ -z "$1" ] ; then
echo "`basename $0` requires a username."
usage
exit 1
fi
echo "Yo-ing $1"
curl --data "api_token=$YO_API_KEY&username=$1" https://api.justyo.co/yo/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment