No project description provided
Project description
Mobizon Client
Ссылка на официальную документацию
Примеры:
Асинхронный клиент
import asyncio
from mobizon_client import AsyncMobizonClient
async def main():
url = 'https://api.mobizon.kz'
api_key = 'xisNSPPFj05WTVyH5oALU86VVuH7SocEUiitN0Og'
client = AsyncMobizonClient(url=url, api_key=api_key)
result = await client.send_message(recipient='77071234567', text='Test message', sender_signature=None)
await asyncio.sleep(3)
result = await client.get_message_status([result.message_id])
assert result[0].status == 'DELIVRD'
await client.close()
if __name__ == '__main__':
asyncio.run(main())
Синхронный клиент
from time import sleep
from mobizon_client import MobizonClient
def main():
url = 'https://api.mobizon.kz'
api_key = 'xisNSPPFj05WTVyH5oALU86VVuH7SocEUiitN0Og'
client = MobizonClient(url=url, api_key=api_key)
result = client.send_message(recipient='77071234567', text='Test message', sender_signature=None)
sleep(3)
result = client.get_message_status([result.message_id])
assert result[0].status == 'DELIVRD'
client.close()
if __name__ == '__main__':
main()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mobizon_client-0.1.2.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for mobizon_client-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6e2d7fb0a26b72ad03391919db92f878bb244713e5c1818ca8eb92a9519587f |
|
MD5 | e7f1ec47640baf1b381b028aa6075351 |
|
BLAKE2b-256 | 9900e66597785ce97a43e47fbaa5ca2a27c1d86dd5257e1b8fc447ce788e14d2 |