Elixir Project 1: Update user's status icon in Slack based on the current weather forecast for Varna
- Authenticate with Slack using this link, choose
users.profile:writescope, and save the returnedaccess token - Create a script that makes GET request to
https://api.darksky.net/forecast/[key]/[latitude],[longitude]where:
keyis API key from https://darksky.net/devlat,longfor Varna is43.2095914,27.9133562
- Map the returned weather icon to emoji shortcode like:
crescent_moon sunny mostly_sunny partly_sunny barely_sunny partly_sunny_rain
cloud rain_cloud thunder_cloud_and_rain lightning snow_cloud fog
- Make POST request to https://api.slack.com/methods/users.profile.set using the
access tokenand the emoji:shortcode: - Push the code to https://github.com/VarnaLab/slack-weather-status in separate branch with your name
- Run the script with Crontab on every 5 minutes