Skip to content

It's a wrapper over the telegram bots api, but in the style of EO.

License

Notifications You must be signed in to change notification settings

l3r8yJ/elegram-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

EO principles respected here DevOps By Rultor.com We recommend IntelliJ IDEA

PDD status Codacy Badge codecov Hits-of-Code

Elegram-api is a wrapper over the telegram bots api, but in the style of EO. More object-oriented, more maintainable.

Concept

This is a concept, if you have ideas, feel free to create an issue!

import Bot;
import Command;
import Update;
import BtDefault;
import java.util.Objects;

/**
 * Simple example.
 */
class App() {
    public static void main(String[] args) {
        new BtDefault(
            "your token",
            new CmdStart()
        ).start();
    }
}

// this is a temporary solution, it will be changed later
class CmdStart() extends Command {
    @Override
    public void act(final Update update, final Bot bot) {
        if (Objects.equals("/start", update.message().text())) {
            bot.sendMessage(
                update.message().chatId(),
                "Hi, this is a start command"
            );
        }
    }
}

Why does this project exist?

This project solves the problem of the existing telegram-bots-api, which for some reason isn't "Object-Oriented", here we can create a wrapper around the original API and make it more "Object-Oriented".

What do I mean when I say object-oriented?

So let's look at cactoos library, I think you get the idea.

How to Contribute

Fork repository, make changes, send us a pull request. We will review your changes and apply them to the master branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run full Maven build:

mvn clean install -Pqulice

You will need Maven 3.3+ and Java 8+ installed

Reasons to reject your code

This short list is supposed to make you understand that we aren't picking on you, it's just a level of quality below which we can't accept.

Tests

We're using this plugin to control naming for tests, please note that.

Looking forward to your pull-request!

Stargazers over time

Stargazers over time

About

It's a wrapper over the telegram bots api, but in the style of EO.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages