<commit_before># Telegram Bot Api [ ![Download](https://api.bintray.com/packages/artfable/telegram-tools/telegram-api/images/download.svg?version=0.3.0) ](https://bintray.com/artfable/telegram-tools/telegram-api/0.3.0/link)
Simple wrapper for using telegram api with java ([Telegram Api](https://core.telegram.org/bots/api)). Bot API version: 2.3.1

Requirements:
* Java 11

*Note! [Kotlin 1.3.72](http://kotlinlang.org/) used as well. However, you can don't care about it, if you don't want to modify.*

Works with [Spring Framework](https://spring.io/)

## Dependency

```kotlin
repositories {
    jcenter()
}

dependencies {
    implementation("org.artfable:telegram-api:0.3.0")
}
```

## Usage

For start create instance of LongPollingTelegramBot or WebhookTelegramBot.
Both types require set of Behaviours - services that handling updates and do logic of the bot. 

### LongPollingTelegramBot

Get updates by requesting them. All requests will be done through taskExecutor. 

### WebhookTelegramBot
<commit_msg>kotlin version<commit_after># Telegram Bot Api [ ![Download](https://api.bintray.com/packages/artfable/telegram-tools/telegram-api/images/download.svg?version=0.3.0) ](https://bintray.com/artfable/telegram-tools/telegram-api/0.3.0/link)
Simple wrapper for using telegram api with java ([Telegram Api](https://core.telegram.org/bots/api)). Bot API version: 2.3.1

Requirements:
* Java 11

*Note! [Kotlin 1.4.0](http://kotlinlang.org/) used as well. However, you can don't care about it, if you don't want to modify.*

Works with [Spring Framework](https://spring.io/)

## Dependency

```kotlin
repositories {
    jcenter()
}

dependencies {
    implementation("org.artfable:telegram-api:0.3.0")
}
```

## Usage

For start create instance of LongPollingTelegramBot or WebhookTelegramBot.
Both types require set of Behaviours - services that handling updates and do logic of the bot. 

### LongPollingTelegramBot

Get updates by requesting them. All requests will be done through taskExecutor. 

### WebhookTelegramBot

{'fraction_non_alphanumeric': 0.12696850393700787, 'fraction_numerical': 0.0172244094488189, 'mean_word_length': 4.585164835164835, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4498809', 'n_tokens_mistral': 705, 'n_tokens_neox': 656, 'n_words': 183}