All Projects → julienXX → Clj Slack

julienXX / Clj Slack

Licence: epl-1.0
Use Slack REST API from Clojure

Programming Languages

clojure
4091 projects
clj
17 projects

Labels

Projects that are alternatives of or similar to Clj Slack

Ravenx
Notification dispatch library for Elixir applications
Stars: ✭ 100 (-15.97%)
Mutual labels:  slack
Teamcity Slack
TeamCity Slack plugin
Stars: ✭ 112 (-5.88%)
Mutual labels:  slack
Realtimechat
Open source, native iOS Messenger, with realtime chat conversations (full offline support).
Stars: ✭ 1,511 (+1169.75%)
Mutual labels:  slack
Slack Notifier
A simple wrapper for posting to slack channels
Stars: ✭ 1,441 (+1110.92%)
Mutual labels:  slack
Slack Bundle
Symfony bundle integration of the nexylan/slack library.
Stars: ✭ 110 (-7.56%)
Mutual labels:  slack
Zenmusic
Slack / Sonos / Spotify / Node.js - Control Sonos through #Slack
Stars: ✭ 113 (-5.04%)
Mutual labels:  slack
Slack Autoarchive
If there has been no activity in a channel for awhile, you can automatically archive it using a cronjob.
Stars: ✭ 97 (-18.49%)
Mutual labels:  slack
Pokevision Cli
PokéVision has shutdown (for now). Follow @PokeVisionGo on Twitter for updates.
Stars: ✭ 118 (-0.84%)
Mutual labels:  slack
Graylog Plugin Slack
Graylog alarm callback for Slack
Stars: ✭ 110 (-7.56%)
Mutual labels:  slack
Template Slash Command And Dialogs
Sample Slack app that uses a Slash Command and interactive message to create helpdesk tickets
Stars: ✭ 114 (-4.2%)
Mutual labels:  slack
Block Slack Users
Hide messages from users and bots, make Slack a Happy Place Again! 😁
Stars: ✭ 105 (-11.76%)
Mutual labels:  slack
Botonomous
A PHP Framework For Creating Autonomous Slack Bots
Stars: ✭ 109 (-8.4%)
Mutual labels:  slack
Slackinviter
Go-ne slackin
Stars: ✭ 113 (-5.04%)
Mutual labels:  slack
Tight
A browser extension that simplifies the Slack interface, making it easier to focus.
Stars: ✭ 101 (-15.13%)
Mutual labels:  slack
Slack Sql
🎉 Bring SQL console to Slack
Stars: ✭ 115 (-3.36%)
Mutual labels:  slack
Parrot
A package to rotate text and party with parrots at the same time
Stars: ✭ 99 (-16.81%)
Mutual labels:  slack
Jamstack Comments Engine
An example of a comments engine you could add to any JAMstack site hosted on Netlify
Stars: ✭ 112 (-5.88%)
Mutual labels:  slack
Tfsnotificationrelay
An extensible plugin for TFS that sends notifications to Slack, HipChat and IRC
Stars: ✭ 120 (+0.84%)
Mutual labels:  slack
Destalinator
Code for managing Cleanup of Stale Channels
Stars: ✭ 115 (-3.36%)
Mutual labels:  slack
Statusok
Monitor your Website and APIs from your Computer. Get Notified through Slack, E-mail when your server is down or response time is more than expected.
Stars: ✭ 1,522 (+1178.99%)
Mutual labels:  slack

clj-slack

clj-slack is a Clojure library to talk to the Slack REST API. It supports almost the entire Slack API.

Build Status

Documentation

Slack API methods are described here.

clj-slack documentation is available here.

Usage

This is on Clojars of course. Just add [org.julienxx/clj-slack "0.6.3"] to your :dependencies in your project.clj file.

Get your access token by creating a new app or here. If you create a new Slack app, don't forget to add the relevant scopes to your app.

Your need to create a connection map like {:api-url "https://slack.com/api" :token "YOUR TOKEN"} and pass it as the first argument of every functions in clj-slack. Of course you can change api-url for debugging or testing purposes.

You can pass clj-http options in the connection map if needed.

clj-slack will throw an Exception if the connection map you're trying to use is not valid.

Example:

(require 'clj-slack.users)
(def connection {:api-url "https://slack.com/api" :token "YOUR TOKEN"})
(clj-slack.users/list connection)

You can use optional params described in Slack API by passing them through a map.

(require 'clj-slack.stars)
(def connection {:api-url "https://slack.com/api" :token "YOUR TOKEN"})
(clj-slack.stars/list connection {:count "2" :page "3"})

Uploading a file:

(require 'clj-slack.files)
(def connection {:api-url "https://slack.com/api" :token "YOUR TOKEN"})
(clj-slack.files/upload connection (clojure.java.io/input-stream "/path/to/file/file.ext") {:channels "CHANNEL_ID", :title "This is a file.})

Testing

In order to run the tests, you have to set 3 environment variables:

  • TOKEN a legacy Slack token
  • CLIENT_ID a OAuth client id
  • CLIENT_SECRET a OAuth client secret then run lein test.

License

Copyright (C) 2014-2019 Julien Blanchard

Distributed under the Eclipse Public License, the same as Clojure.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].