Including in your project¶
There are three projects:
TelegramBotAPI Core
- project with base for all working with Telegram Bot APITelegramBotAPI API Extensions
- extension ofTelegramBotAPI
with functions for more comfortable work with Telegram Bot APITelegramBotAPI Utils Extensions
- extension ofTelegramBotAPI
with functions for extending of different things like retrieving of updates
TelegramBotAPI
Also, there is an aggregator-version tgbotapi
, which will automatically include all projects above. It is most recommended version due to the fact that it is including all necessary tools around TelegramBotAPI Core
, but it is optionally due to the possible restrictions on the result methods count (for android) or bundle size
Examples
You can find full examples info in this repository. In this repository there full codes which are working in normal situation. Currently, there is only one exception when these examples could work incorrectly: you are living in the location where Telegram Bot API is unavailable. For solving this problem you can read Proxy setup part
Notice about repository¶
To use this library, you will need to include Maven Central
repository in your project
build.gradle¶
pom.xml¶
<repository>
<id>central</id>
<name>mavenCentral</name>
<url>https://repo1.maven.org/maven2</url>
</repository>
Dev channel¶
Besides, there is developer versions repo. To use it in your project, add the repo in repositories
section:
Maven
TelegramBotAPI¶
As tgbotapi_version
variable in next snippets will be used variable with next last published version:
build.gradle¶
pom.xml¶
<dependency>
<groupId>dev.inmo</groupId>
<artifactId>tgbotapi</artifactId>
<version>${tgbotapi_version}</version>
</dependency>
TelegramBotAPI Core¶
As tgbotapi_version
variable in next snippets will be used variable with next last published version:
build.gradle¶
pom.xml¶
<dependency>
<groupId>dev.inmo</groupId>
<artifactId>tgbotapi.core</artifactId>
<version>${tgbotapi_version}</version>
</dependency>
TelegramBotAPI API Extensions¶
As tgbotapi_version
variable in next snippets will be used variable with next last published version:
build.gradle¶
pom.xml¶
<dependency>
<groupId>dev.inmo</groupId>
<artifactId>tgbotapi.api</artifactId>
<version>${tgbotapi_version}</version>
</dependency>
TelegramBotAPI Utils Extensions¶
As tgbotapi_version
variable in next snippets will be used variable with next last published version:
build.gradle¶
pom.xml¶
<dependency>
<groupId>dev.inmo</groupId>
<artifactId>tgbotapi.utils</artifactId>
<version>${tgbotapi_version}</version>
</dependency>