Go
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
.circleci fix circleci tests Jan 23, 2018
cmd add suffix to the example main.go to avoid mislead Jan 19, 2018
modules/feedback Docker, multi-instance approach, modules Dec 29, 2017
.dockerignore make the docker image tiny Jan 23, 2018
Dockerfile Docker: include zoneinfo.zip Jan 28, 2018
Gopkg.lock correlate chosen_inline_result with incoming message in chat Apr 30, 2018
Gopkg.toml update deps Apr 13, 2018
LICENSE Initial commit Jul 2, 2016
README.md Updated README.md with more docker installation details Feb 23, 2018
bots.go added jobs duration logging Mar 16, 2018
bots_test.go mv github.com/requilence/integram/url to github.com/requilence/url Jan 19, 2018
config.go Service jobs processing improvement Mar 15, 2018
context.go fix Feb 4, 2018
context_test.go msg test fix Jan 31, 2018
data.go Add the optional sorting to FindUsersLimit / FindChatsLimit May 15, 2018
data_test.go fix broken test Feb 10, 2018
docker-compose.yml make the docker image tiny Jan 23, 2018
encode.go Go syntax fixes Jul 10, 2016
handlers.go return after service TokenHandler Feb 26, 2018
helpers.go improved func name encoding for jobs & reply/callback actions Feb 28, 2018
richtext.go TG HTML - do not escape & Dec 19, 2016
richtext_test.go some tests fixes Dec 19, 2016
services.go fix prev commit Mar 16, 2018
services_test.go Docker, multi-instance approach, modules Dec 29, 2017
stat.go imprv kicked/stopped flow Feb 10, 2018
templates.go move html templates inside the GO code Jan 25, 2018
tgupdates.go User's lang field added Jun 6, 2018
tgupdates_test.go fix tests Jan 18, 2018
types.go User's lang field added Jun 6, 2018

README.md

Integram 2.0

Framework and platform to integrate services with Telegram using the official Telegram Bot API

ℹ️ Individual integration repos are located at https://github.com/integram-org.

CircleCI Docker Image GoDoc

Screencast

How to use Integram in Telegram (using public bots)

Just use these links to add bots to your Telegram

Did not find your favorite service? 🤘 Vote for it

How to host Integram on your own server (using your private bots)

🐳 Docker way

   git clone https://github.com/requilence/integram && cd integram
  • Check the docker-compose.yml file for the required ENV vars for each service
    • E.g. in order to run the Trello integration you will need to export:

      • INTEGRAM_BASE_URL – the base URL where your Integram host will be accessible, e.g. https://integram.org

      • INTEGRAM_PORT – if set to 443 Integram will use ssl.key/ssl.cert at /go/.conf.

        This directory is mounted on your host machine. Just get the path and put these files inside

           ## Get the path of config directory on the host machine
           docker volume inspect -f '{{ .Mountpoint }}' integram_data-mainapp
      • TRELLO_BOT_TOKEN – your bot's token you got from @BotFather

      • You will need to get your own OAuth credentials from Trello

        • TRELLO_OAUTH_ID – API Key
        • TRELLO_OAUTH_SECRET – OAuth Secret
    • For more detailed info about other services you should check the corresponding repo at https://github.com/integram-org

  • Export the variables you identified in the previous step, for instance on linux this should be something like:
   export INTEGRAM_PORT=xxxx
   export ...
  • Now you can run the services (linux: careful if you need to sudo this, the exports you just did will not be available) :
   docker-compose -p integram up trello gitlab ## Here you specify the services you want to run
  • Or in background mode (add -d):
   docker-compose -p integram up -d trello gitlab
  • You should now see Integram's startup logs in your console
  • In Telegram, you can now start your bots (/start) and follow their directions, configure them using /settings
  • Some useful commands:
   ## Check the containers status
   docker ps
   
   ## Fetch logs for main container
   docker logs -f $(docker ps -aqf "name=integram_integram")   
  • To update Integram to the latest version:
    ## Fetch last version of images
    docker-compose pull integram trello gitlab
    ## Restart containers using the new images
    docker-compose -p integram up -d trello gitlab

🛠 Old-school way (No docker)

    ## set the GOPATH to the absolute path of directory containing 'src' directory that you have created before
    export GOPATH=/var/integram
    
    cd $GOPATH/src/integram
    ## install dependencies
    dep init
    go build integram && ./integram

Dependencies

Dependencies are specified in Gopkg.toml and fetched using Go dep

Contributing

Feel free to send PRs. If you want to contribute new service integrations, please create an issue first. Just to make sure someone is not already working on it.

Libraries used in Integram

License

Code licensed under GPLV3 license

Analytics