GithubHelp home page GithubHelp logo

bsedin / integram Goto Github PK

View Code? Open in Web Editor NEW

This project forked from requilence/integram

0.0 2.0 0.0 5.76 MB

Integrate Telegram into your workflow – https://integram.org

License: GNU General Public License v3.0

Go 100.00%

integram's Introduction

Integram 2.0

Framework and platform for integrating services into Telegram using official Bot API

GoDoc CircleCI

Screencast

How to use Integram

Just use this links to add integrations you are interested in

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

main.go example

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()
}

Dependencies and vendor directory

All dependencies come with package itself and may be modified directly (see the Third party libraries)

Requirements

Go 1.5+, MongoDB 3.2+ (for data), Redis 3.2.0+ (for jobs queue)

Contributing

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.

Third party libraries

* - package source is modified

License

Code available on GPLV3 license

Analytics

integram's People

Contributors

olebedev avatar requilence avatar tru2dagame avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.