Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ufanet_intercom_api-0.0.6.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ufanet_intercom_api-0.0.6-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file ufanet_intercom_api-0.0.6.tar.gz.

File metadata

  • Download URL: ufanet_intercom_api-0.0.6.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.20

File hashes

Hashes for ufanet_intercom_api-0.0.6.tar.gz
Algorithm Hash digest
SHA256 7b262e39d6ebb72aaaaa2961824923797a423c51d48883d5aea51ff9be0061dc
MD5 d68db164162378a5b4a2bfdd8133b4f1
BLAKE2b-256 59010648f89585952c015f271326ce9f76c215af4f43ebc960ccef7f24914fe0

See more details on using hashes here.

File details

Details for the file ufanet_intercom_api-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for ufanet_intercom_api-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3fd401d470d069a66e34b452b28db937f05998d91df0d5e56a1e2e5440155b7a
MD5 b66b14ef6f9310465d32679dac6e65ef
BLAKE2b-256 e8e0131b2aeca7db16d8ab67bdc0983d713d7eea41a5eabb973d70742af9c971

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page