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.10.tar.gz (6.3 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.10-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ufanet_intercom_api-0.0.10.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.18

File hashes

Hashes for ufanet_intercom_api-0.0.10.tar.gz
Algorithm Hash digest
SHA256 5609805383986b6021dc9b83eccfb5d047bbf2de832a057940006d23f8c97b3f
MD5 89a70e74998b09419014f23f91cace85
BLAKE2b-256 5d904fbbd0f7585bf21762b7fb161e37bce6a819f159a697d4ba90b457e7ec02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ufanet_intercom_api-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 6ad4f556f3d98ecedb06b4cc534563bc626fd4bfe217bbf14782ddcf02c5b9b8
MD5 7bcf515ae478d623e245a4125c9bac7a
BLAKE2b-256 9da6ca797c1c9994c8a887f447901930e98d5acbb1015c689739c28ca1bf61ed

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