aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2017-09-03 02:11:10 +0530
committerArun Isaac2017-09-03 02:11:10 +0530
commit5667a5bb1dec6c15e46ab917773433b19db39c89 (patch)
tree8a1878b0ca260e81e8a56c708b366602d20e0c67
parentbefcda1cdd0cddc72b4c844184da0784f83261a1 (diff)
downloadnasa-apod-gnu-social-bot-5667a5bb1dec6c15e46ab917773433b19db39c89.tar.gz
nasa-apod-gnu-social-bot-5667a5bb1dec6c15e46ab917773433b19db39c89.tar.lz
nasa-apod-gnu-social-bot-5667a5bb1dec6c15e46ab917773433b19db39c89.zip
Check bot authentication details.
* apod-bot.sh: Make API request just to check if bot username/password are valid.
-rwxr-xr-xapod-bot.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/apod-bot.sh b/apod-bot.sh
index f05b8fb..5bd3952 100755
--- a/apod-bot.sh
+++ b/apod-bot.sh
@@ -19,6 +19,9 @@ bot_password=secret-password-here
apod_base_url=https://apod.nasa.gov/apod
+# Check if the bot username/password are correct
+curl -sSfu "$bot_username:$bot_password" -o /dev/null $social_api_url/statuses/home_timeline.json
+
# Download HTML page, and scrape required information
apod_html=$(curl -sS $apod_base_url/astropix.html)