RubigramClient 1.3.0__py3-none-any.whl → 1.3.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of RubigramClient might be problematic. Click here for more details.
- rubigram/client.py +5 -6
- {rubigramclient-1.3.0.dist-info → rubigramclient-1.3.2.dist-info}/METADATA +2 -1
- rubigramclient-1.3.2.dist-info/RECORD +9 -0
- rubigramclient-1.3.0.dist-info/RECORD +0 -9
- {rubigramclient-1.3.0.dist-info → rubigramclient-1.3.2.dist-info}/WHEEL +0 -0
- {rubigramclient-1.3.0.dist-info → rubigramclient-1.3.2.dist-info}/licenses/LICENSE +0 -0
- {rubigramclient-1.3.0.dist-info → rubigramclient-1.3.2.dist-info}/top_level.txt +0 -0
rubigram/client.py
CHANGED
|
@@ -5,16 +5,15 @@ import aiofiles
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class Client:
|
|
8
|
-
def __init__(self, token: str
|
|
8
|
+
def __init__(self, token: str):
|
|
9
9
|
self.token = token
|
|
10
|
-
self.webhook = webhook_url
|
|
11
|
-
self.port = port
|
|
12
10
|
self.messages_handler = []
|
|
13
|
-
self.api = "https://botapi.rubika.ir/v3"
|
|
11
|
+
self.api = f"https://botapi.rubika.ir/v3/{self.token}"
|
|
14
12
|
|
|
15
13
|
async def request(self, method: str, data: dict):
|
|
16
14
|
async with ClientSession() as session:
|
|
17
|
-
async with session.post(f"{self.api}/{
|
|
15
|
+
async with session.post(f"{self.api}/{method}", json=data) as response:
|
|
16
|
+
response.raise_for_status()
|
|
18
17
|
return await response.json()
|
|
19
18
|
|
|
20
19
|
def on_message(self, *filters):
|
|
@@ -315,4 +314,4 @@ class Client:
|
|
|
315
314
|
return web.json_response({"status": "ok"})
|
|
316
315
|
app = web.Application()
|
|
317
316
|
app.add_routes(routes)
|
|
318
|
-
web.run_app(app, host=
|
|
317
|
+
web.run_app(app, host="0.0.0.0", port=8000)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: RubigramClient
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.2
|
|
4
4
|
Summary: A simple and flexible Python library for building advanced Rubika bots with powerful message handling, inline buttons, and custom filters.
|
|
5
5
|
Author-email: Javad RZ <Javad.Py1385@gmail.com>
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -9,6 +9,7 @@ Classifier: Operating System :: OS Independent
|
|
|
9
9
|
Requires-Python: >=3.7
|
|
10
10
|
Description-Content-Type: text/markdown
|
|
11
11
|
License-File: LICENSE
|
|
12
|
+
Requires-Dist: aiohttp>=3.8.0
|
|
12
13
|
Dynamic: license-file
|
|
13
14
|
|
|
14
15
|
# Rubigram
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
rubigram/__init__.py,sha256=K1WXGcBx9-1cLmImtnruqFk91nb_6XuhY_Ud0KS_IUk,55
|
|
2
|
+
rubigram/client.py,sha256=5xaA_HOMQIU5HyEadUdT-WpD9CxGE0wxbwImqQg29Zw,11506
|
|
3
|
+
rubigram/filters.py,sha256=HuW_Rscb02TK3Qm7jKVyvy-83FP-plIjTLTccypVniw,1468
|
|
4
|
+
rubigram/types.py,sha256=GIGvTGdDURuwJ3oHPvRR7B8oJ3V1f8MDaMAqjvOOO-0,16813
|
|
5
|
+
rubigramclient-1.3.2.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
rubigramclient-1.3.2.dist-info/METADATA,sha256=eFXLcEp55Hxf_A9WYnrvn1RxBHx3olq-wR6iODLpxkQ,984
|
|
7
|
+
rubigramclient-1.3.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
+
rubigramclient-1.3.2.dist-info/top_level.txt,sha256=Mhg5HfkL6rLec5sI4ClGmwoqYUANAZUz8sVa1sT_cas,9
|
|
9
|
+
rubigramclient-1.3.2.dist-info/RECORD,,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
rubigram/__init__.py,sha256=K1WXGcBx9-1cLmImtnruqFk91nb_6XuhY_Ud0KS_IUk,55
|
|
2
|
-
rubigram/client.py,sha256=pvg-lokbQk6HAWlId578A9PugwgzEcAEsOGfHle-SiI,11578
|
|
3
|
-
rubigram/filters.py,sha256=HuW_Rscb02TK3Qm7jKVyvy-83FP-plIjTLTccypVniw,1468
|
|
4
|
-
rubigram/types.py,sha256=GIGvTGdDURuwJ3oHPvRR7B8oJ3V1f8MDaMAqjvOOO-0,16813
|
|
5
|
-
rubigramclient-1.3.0.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
rubigramclient-1.3.0.dist-info/METADATA,sha256=CqCq-HsdvgeOZf2YzpHWRArfmYAgzV8JRAQXblVOfTY,953
|
|
7
|
-
rubigramclient-1.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
-
rubigramclient-1.3.0.dist-info/top_level.txt,sha256=Mhg5HfkL6rLec5sI4ClGmwoqYUANAZUz8sVa1sT_cas,9
|
|
9
|
-
rubigramclient-1.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|