Framework and platform for integrating services into Telegram using official Bot API
Just use this links to add integrations you are interested in
-
GitHub – GitHub bot was developed by Igor Zhukov and it is not the part of Integram
Not found you favorite service? 🤘 Vote for it Running Integram on your side
You can run Integram on your own server.
- Create the main.go file (example is below)
- Use your own bot created with Botfather.
- For the each service you are want to use you need to create an OAuth client(application) in it
- Set environment variable GOPATH to the directory contains main.go file
- Run go get github.com/requilence/integram
- Specify environment variables:
- INTEGRAM_PORT - if set to 443, integram.crt and integram.key must be presented in the root
- INTEGRAM_BASE_URL - the base URL the host accessible with, f.e. https://integram.org
- Run go run main.go or go build && ./integram
- In order to run test with go test you need to set some environment variables:
- INTEGRAM_TEST_BOT_TOKEN - to perform some non-emulated Telegram tests
- INTEGRAM_TEST_USER - Telegram user id that have a dialog with this bot
package main
import (
"github.com/requilence/integram"
"github.com/requilence/integram/services/trello"
"github.com/requilence/integram/services/gitlab"
)
func main() {
integram.Debug=true
integram.Register(
trello.Config{
integram.OAuthProvider{
ID: "TRELLO_APP_KEY",
Secret: "TRELLO_APP_SECRET",
},
},
"BOT_TOKEN_PROVIDED_BY_@BOTFATHER",
)
integram.Register(
gitlab.Config{
integram.OAuthProvider{
ID: "GITLAB_APP_ID",
Secret: "GITLAB_APP_SECRET",
},
},
"BOT_TOKEN_PROVIDED_BY_@BOTFATHER",
)
integram.Run()
}
All dependencies come with package itself and may be modified directly (see the Third party libraries)
Go 1.5+, MongoDB 3.2+ (for data), Redis 3.2.0+ (for jobs queue)
Feel free to send PRs. If you want to contribute new service integration, please create the issue first. Just to make sure developing is not already in progress.
- Telegram Bindings *
- Gin – HTTP router and framework
- Mgo – MongoDB driver
- Jobs – background jobs *
- Redigo – Redis driver
- Logrus – structure logging
- Trello bindings *
- Gitlab bindings *
- Bitbucket bindings *
* - package source is modified
Code available on GPLV3 license