Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 1.25 KB

README.md

File metadata and controls

23 lines (18 loc) · 1.25 KB

Elixir Project 1: Update user's status icon in Slack based on the current weather forecast for Varna

  1. Authenticate with Slack using this link, choose users.profile:write scope, and save the returned access token
  2. Create a script that makes GET request to https://api.darksky.net/forecast/[key]/[latitude],[longitude] where:
  1. 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
  1. Make POST request to https://api.slack.com/methods/users.profile.set using the access token and the emoji :shortcode:
  2. Push the code to https://github.com/VarnaLab/slack-weather-status in separate branch with your name
  3. Run the script with Crontab on every 5 minutes

Solutions