#slack #client

slack-morphism

Slack Morphism is a modern client library for Slack Web/Events API and Block Kit

58 releases (35 breaking)

Uses new Rust 2021

new 0.37.0 May 16, 2022
0.35.0 May 9, 2022
0.32.0 Mar 12, 2022
0.22.0 Dec 30, 2021
0.3.1 Oct 20, 2020

#72 in Web programming

Download history 130/week @ 2022-01-26 38/week @ 2022-02-02 105/week @ 2022-02-09 53/week @ 2022-02-16 142/week @ 2022-02-23 74/week @ 2022-03-02 54/week @ 2022-03-09 298/week @ 2022-03-16 130/week @ 2022-03-23 44/week @ 2022-03-30 81/week @ 2022-04-06 50/week @ 2022-04-13 61/week @ 2022-04-20 625/week @ 2022-04-27 472/week @ 2022-05-04 979/week @ 2022-05-11

2,141 downloads per month
Used in 2 crates

Apache-2.0

205KB
5.5K SLoC

Cargo tests and formatting security audit

Slack Morphism for Rust

Slack Morphism is a modern client library for Slack Web/Events API/Socket Mode and Block Kit.

Documentation

Please follow to the official website: https://slack-rust.abdolence.dev.

Examples

https://github.com/abdolence/slack-morphism-rust/tree/master/src/hyper/examples

The examples require to work the following environment variables (from your Slack bot profile in api.slack.com):

  • SLACK_TEST_TOKEN - for Slack client example
  • SLACK_TEST_APP_TOKEN - for Slack client with Socket Mode example
  • SLACK_CLIENT_ID, SLACK_CLIENT_SECRET, SLACK_BOT_SCOPE, SLACK_REDIRECT_HOST - for OAuth routes for Events API example
  • SLACK_SIGNING_SECRET for all routes for Events API example

To run example use with environment variables:

# SLACK_... cargo run --example <client|events_api_server|socket_mode>

Routes for this example are available on http://:8080:

  • /auth/install - to begin OAuth installation
  • /auth/callback - a callback endpoint for Slack OAuth profile config
  • /push - for Slack Push Events
  • /interaction - for Slack Interaction Events
  • /command - for Slack Command Events

Licence

Apache Software License (ASL)

Author

Abdulla Abdurakhmanov

Dependencies

~14MB
~342K SLoC