The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. #
  3. # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
  4. #
  5. if [[ -z "${GODADDY_API_KEY}" ]] ; then
  6. echo "GODADDY_API_KEY not defined in environment"
  7. exit 1
  8. fi
  9. if [[ -z "${GODADDY_API_SECRET}" ]] ; then
  10. echo "GODADDY_API_SECRET not defined in environment"
  11. exit 1
  12. fi
  13. URI="${1:?no uri}"
  14. POST_FILE="${2}"
  15. HTTP_METHOD=${3}
  16. API_BASE=https://api.godaddy.com/v1/domains/
  17. if [[ ! -z "${POST_FILE}" ]] ; then
  18. if [[ -z "${HTTP_METHOD}" ]] ; then
  19. curl -d @${POST_FILE} -s -H 'Content-Type: application/json' -H "Authorization: sso-key ${GODADDY_API_KEY}:${GODADDY_API_SECRET}" ${API_BASE}${URI}
  20. else
  21. curl -d @${POST_FILE} -X ${HTTP_METHOD} -s -H 'Content-Type: application/json' -H "Authorization: sso-key ${GODADDY_API_KEY}:${GODADDY_API_SECRET}" ${API_BASE}${URI}
  22. fi
  23. else
  24. curl -s -H "Authorization: sso-key ${GODADDY_API_KEY}:${GODADDY_API_SECRET}" ${API_BASE}${URI}
  25. fi