#!/bin/bash # # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ # if [[ -z "${DIGITALOCEAN_API_KEY}" ]] ; then echo "DIGITALOCEAN_API_KEY not defined in environment" exit 1 fi path=${1:?no path provided} shift curl ${@} -s -H "Authorization: Bearer ${DIGITALOCEAN_API_KEY}" 'https://api.digitalocean.com/v2/'"${path}"''