RubigramClient 1.3.0__py3-none-any.whl → 1.3.1__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 CHANGED
@@ -5,16 +5,15 @@ import aiofiles
5
5
 
6
6
 
7
7
  class Client:
8
- def __init__(self, token: str, webhook_url: str = "0.0.0.0", port: int = 5000):
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}/{self.token}/{method}", json=data) as response:
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=self.webhook, port=self.port)
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.0
3
+ Version: 1.3.1
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,8 @@ 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
13
+ Requires-Dist: pydantic<3.0,>=2.0
12
14
  Dynamic: license-file
13
15
 
14
16
  # 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.1.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ rubigramclient-1.3.1.dist-info/METADATA,sha256=U-bfJY1MaOHP4U81eFcVdPqQyHAocD9uMfEK02DhdBM,1019
7
+ rubigramclient-1.3.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
8
+ rubigramclient-1.3.1.dist-info/top_level.txt,sha256=Mhg5HfkL6rLec5sI4ClGmwoqYUANAZUz8sVa1sT_cas,9
9
+ rubigramclient-1.3.1.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,,