Homework 5

Write a Twitter bot that, when run, posts the time of sunrise and sunset in College Park for the current day. Use the Open Weather Map API (See our api code where we covered this) to get the times and use the bot code we started today to post to Twitter.

Your messages should look like "The sunrise today in College Park, MD is at 7:45am and sunset is at 6:15pm" (obviously with the times replaced with the actual time).

Note that I will be running your code to test it, so expect a post or two to appear on your page when I do that. Be sure all your API keys and secrets are in the code and accurate.

1 point extra credit if you have a set of sunrise/sunset images and pick one each day to post with your times as part of the tweet. If you do this, make a folder for your code with your name on the folder, and include the perl file and images in the folder. I will check for this and put in the correct path to the code when I test it on my computer.