Skip to content

Latest commit

 

History

History
44 lines (39 loc) · 1.75 KB

README.md

File metadata and controls

44 lines (39 loc) · 1.75 KB

Weather API for Slack

Table of contents

Introduction

  • This project implements REST-API which is designed to be integrated with a slack-app. Using this API, I have created a slack command (/weather city_name) using which users can see the weather details of the specified city.
  • Below is a snapshot of output
    • slack weather command

Technologies

  • The project has been implemented using Node.js, AWS lambda, API Gateway and Serverless framework.

Using this API in Slack

  • Create a slack app
  • In Basic Information page of your slack app, select Slack commands from Add features and functionality dropdown .
  • Click on Install App to Workspace button in the Install your app to your workspace dropdown.
  • Yaay!!, you are ready to use the command.

Deploying this API

  • Install and Configure the serverless framework with your AWS account.
  • Execute the following commands.
$ npm install
$ serverless deploy

Sources

  • The Project makes use of Dark Sky Api and Geocode API.
    • Geocode API is used to fetch latitude and longitude based on city name provided
    • Dark Sky API is used to fetch weather conditions based on latitude and longitude.

Tests

  • The unit tests are written using Jest testing framework.
  • To run tests
    npm test