GithubHelp home page GithubHelp logo

ievangelist.slack.slashcommands's Introduction

Slack

/ Commands (slash commands)

Getting Started

This ASP.NET Core Web API application is hosted in Azure as an App Service. It is configured to leverage bitly, open weather map and the icndb apis. All of these APIs require various credentials and registration to consume them.

Add environment variables for open weather map:

setx OpenWeatherMapOptions__Key [Your Key Here]

Add environment variables for bit.ly:

setx BitlyOptions__ApiKey [Your API Key Here]
setx BitlyOptions__Login [Your Login Here]

Visual Studio requires a restart after environment variables have been added.

APIs

All of these APIs are HTTP Post and expect the SlackCommandRequest object.

api/jokes/random

This endpoint maps to the /joke and /joke share slash commands.

Description

Returns a random nerdy joke about Chuck Norris. There is an optional parameter, type share to make the joke public to everyone in the room.

api/weather

This endpoint maps to the /weather [zip-code] slash command.

Description

Given a zip-code will return the current weather, with corresponding emoji.

api/urls/shorten

This endpoint maps to the /shortenUrl [longUrl] slash command.

Description

Given a long URL, will return a shortened URL - leverages bit.ly API under the covers.

Resources

ievangelist.slack.slashcommands's People

Contributors

ievangelist avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.