Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webapi #33

Merged
merged 4 commits into from
Dec 24, 2023
Merged

Webapi #33

merged 4 commits into from
Dec 24, 2023

Conversation

umputun
Copy link
Owner

@umputun umputun commented Dec 24, 2023

Add basic support of rest-like API, allowing the use of the detection part of the bot from external systems. This can be handy for users who need to run some anti-spam solution outside of the telegram.

It adds a new set of server.* parameters allowing the server to listen on some port, and it exposes a few basic endpoints, like /check, /users, and so on.

Enabling the server allows running tg-bot without any connection to the telegram, i.e. without token and group. In this case, the bot has nothing to do with the telegram and will serve API only.

Copy link

cloudflare-pages bot commented Dec 24, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9cd08fd
Status: ✅  Deploy successful!
Preview URL: https://8a89ff39.tg-spam.pages.dev
Branch Preview URL: https://webapi.tg-spam.pages.dev

View logs

add basic rest-like webapi

use spam bot as detector for webapi

it already loads and monitor all sample files

adjust json tags for check results
add explanation about side-by-side server

update site
@umputun umputun merged commit 8cc2a3e into master Dec 24, 2023
4 of 5 checks passed
@umputun umputun deleted the webapi branch December 24, 2023 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant