API wrapper for managing the Ufanet intercom.
Project description
Ufanet Intercom API
Описание / Description
Обёртка API для управления домофоном провайдера Уфанет.
A wrapper for the Ufanet intercom system API.
Установка / Installation
pip install ufanet-intercom-api
Использование / Usage
import asyncio
from ufanet_intercom_api import UfanetIntercomAPI
CONTRACT = 'your_contract'
PASSWORD = 'your_password'
async def main():
ufanet_api = UfanetIntercomAPI(contract=CONTRACT, password=PASSWORD)
# Получение списка домофонов / Fetching available intercoms
intercoms = await ufanet_api.get_intercoms()
print('Available intercoms:', intercoms)
# Открытие всех доступных домофонов / Unlocking all available intercoms
for i in intercoms:
await ufanet_api.open_intercom(intercom_id=i.id)
# Получение истории вызовов / Retrieving call history
call_history = await ufanet_api.get_call_history()
for call in call_history.results:
print(f'Call UUID: {call.uuid}, Date: {call.called_at}')
# Получение ссылок на записи вызовов / Fetching call recording links
if call_history.results:
links = await ufanet_api.get_call_history_links(uuid=call_history.results[0].uuid)
print('Call history links:', links)
# Закрытие сессии / Closing the session
await ufanet_api.close()
asyncio.run(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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ufanet_intercom_api-0.0.9.tar.gz.
File metadata
- Download URL: ufanet_intercom_api-0.0.9.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4e9acf84044a3b1c9a0207dcbcd42b3579ca487d3bab0ec29e2b3d68b970b66
|
|
| MD5 |
3b02a7ab73f80f1d47c5444860f63c90
|
|
| BLAKE2b-256 |
f4dec2a7f6519f8362565377d15b966148e2ad23a1fc61f514cb729219216cc9
|
File details
Details for the file ufanet_intercom_api-0.0.9-py3-none-any.whl.
File metadata
- Download URL: ufanet_intercom_api-0.0.9-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
466fc3ee388efd8fa07ecc975caf5a1e704cb4c221ae7a9c5ab7df21e14d8db6
|
|
| MD5 |
77da4ba56d86ae7328450f9590400705
|
|
| BLAKE2b-256 |
991091e8544fd75a174f90e382c197204a8d24be4ec90ea7dab00248bdb3351f
|