-
-
Save mambocab/dd1a401e1303d257afad to your computer and use it in GitHub Desktop.
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
#!/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