Skip to content

Instantly share code, notes, and snippets.

@nrrb
Forked from elbuo8/doapi.sh
Created January 24, 2014 01:12
Show Gist options
  • Save nrrb/8590240 to your computer and use it in GitHub Desktop.
Save nrrb/8590240 to your computer and use it in GitHub Desktop.
endpoints=(sizes regions images ssh_keys)
for i in "${endpoints[@]}"; do
url=`printf "https://api.digitalocean.com/%s/?client_id=%s&api_key=%s" $i $DO_CLIENT_ID $DO_API_KEY`
curl --silent $url | python -mjson.tool
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment