This repository has been archived by the owner on Dec 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a137c7b
Showing
6 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup mdBook | ||
uses: peaceiris/actions-mdbook@v1 | ||
with: | ||
mdbook-version: latest | ||
|
||
- run: mdbook build | ||
|
||
- uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./book |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
book |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[book] | ||
authors = [] | ||
language = "en" | ||
multilingual = false | ||
src = "src" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Summary | ||
|
||
- [Introduction](./introduction.md) | ||
|
||
<!-- - [Getting Started](./getting-started.md) --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Getting Started |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Welcome to MTKruto | ||
|
||
MTKruto is a library that lets you interact with the | ||
[Telegram API](https://core.telegram.org/#telegram-api). It can be used from | ||
JavaScript or TypeScript, and can run on Deno, browsers, and Node.js. | ||
|
||
## The Telegram API vs. the Bot API | ||
|
||
[Bot API](https://core.telegram.org/bots/api) is a high-level HTTP interface to | ||
the Telegram API that makes it easy to develop bots and lets you focus on being | ||
more productive. We highly recommend it if you’re planning to develop complex | ||
bots. | ||
|
||
On the other hand, the Telegram API is the main API for building Telegram | ||
clients. It uses the [MTProto](https://core.telegram.org/mtproto) protocol which | ||
makes it a little more difficult to consume than the Bot API. Telegram clients | ||
can be a GUI application on an end user’s device, or a process running | ||
continuously in a server. | ||
|
||
While the Bot API can only be used to work with bot accounts, the Telegram API | ||
can be used to work with both bot and user accounts. As mentioned previously, | ||
the Bot API is simply an interface to work with bot accounts using the Telegram | ||
API. | ||
|
||
## When to Use the Telegram API | ||
|
||
- If you want to bypass the limits of the main instance of the Bot API without | ||
hosting your own instance (e.g., work with large files). | ||
- If you want to develop your own Telegram app (e.g., alternative to | ||
[Telegram Web](https://web.telegram.org/a)). | ||
- If you want to automate user accounts. | ||
- If you have your own reasons. | ||
|
||
## Things to Consider | ||
|
||
- You can’t interact with the Telegram API using webhooks. You have to maintain | ||
a connection with Telegram servers. |