Last active
January 11, 2016 07:30
-
-
Save protosam/8c5c2130b69ace4f646f to your computer and use it in GitHub Desktop.
This file contains 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 | |
# Include ticktick (https://github.com/kristopolous/TickTick) | |
curl -s https://raw.githubusercontent.com/kristopolous/TickTick/master/ticktick.sh > /tmp/ticktick.sh | |
source /tmp/ticktick.sh | |
rm -rf /tmp/ticktick.sh | |
MAILAPI="key-06ha5mc4hlpsl8-rwj66a8ctn1omzko6" | |
# get the data | |
DATA=`curl -s https://api.mailgun.net/v2/domains --user "api:$MAILAPI"` | |
echo THE RAW DATA | |
echo $DATA | |
echo =============== | |
# Turn it into useable object, spit out one | |
tickParse "$DATA" | |
echo ``items[0].name`` | |
echo =============== | |
# make that item a bash variable | |
THETHING=``items[0].name`` | |
echo $THETHING | |
# leave something here to ensure EOF is safe. TickTick.sh does weird shit. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment