Do you use Slack? Do you share links with your co-workers? SlackBot-Links store all theses urls, enrich them with metadata, and expose them through a REST API. You can now find shared urls by searching in their title, content, author name...
go get github.com/jguyomard/slackbot-links
Note: You need to set GOPATH
correctly before running this.
Once you create this bot, you will get an API token. Create config.yaml
and edit it to add your bot token:
cp $GOPATH/src/github.com/jguyomard/slackbot-links/config.yaml.sample /etc/slackbot-links/config.yaml
vi /etc/slackbot-links/config.yaml
Then, invite this bot to channels of your choice (#links
for instance).
This bot use Elastic Search to save links. The client connects to Elasticsearch on http://localhost:9200
by default.
For instance, to start Elastic Search using official docker image:
docker run -d -p 9200:9200 elasticsearch:2
if $PATH
contains $GOPATH/bin
, slackbot-links
command is now available:
slackbot-links -config-file=/etc/slackbot-links/config.yaml
Your bot is live!
You can now share link on #links
and fetch them using REST API :
curl localhost:9300/v1/links/
REST API Documentation can be found here.
This documentation is generated from API.apib
file (API Blueprint syntax):
make docapi
This command recreates the Elasticsearch index from a given links.log
log file.
This is very useful for fast testing with a given scenario, or for initializing a staging environment, for instance.
slackbot-links -config-file=/etc/slackbot-links/config.yaml -links-file=./links-tests.log restore
If a link already exists (same ID), it is updated.
To run the test suite:
make test
If you have any problems with or questions about this Service Provider, please contact me through a GitHub issue.
You are invited to contribute new features, fixes or updates to this container, through a Github Pull Request.