Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fr4ncistaylor/tgtoobj
Parser telegram API BOT updates to object.
https://github.com/fr4ncistaylor/tgtoobj
Last synced: 6 days ago
JSON representation
Parser telegram API BOT updates to object.
- Host: GitHub
- URL: https://github.com/fr4ncistaylor/tgtoobj
- Owner: Fr4ncisTaylor
- License: apache-2.0
- Created: 2020-10-30T08:28:07.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-10-31T07:23:04.000Z (about 4 years ago)
- Last Synced: 2024-09-12T19:58:21.381Z (2 months ago)
- Language: Python
- Size: 20.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
{ Telegram api To Object }
Parser telegram API BOT updates to object.
* * *
## Install
* Pip ```pip install tg-to-obj```
* Git Clone: ```git clone https://github.com/francis-taylor/TgToObj/ && cd TgToObg && python setup.py install```
## Basic use
_I will be using the [Amanobot](https://pypi.org/project/amanobot/) framework to receive [api updates](https://core.telegram.org/bots/api#update)._
```python
import amanobot
import tg_to_objbot = amanobot.Bot('1111560977:AAGUffJO2TEw49v81bsPbtWXKR4mYVejvuA')
for i in bot.get_updates():
print("Input:", tg_to_obj.Make(msgs).update_type) ## get the type of update
```**the field from has been changed to from_user, as it is a python obj declared by default.**