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)
        
    # Получение списков всех камер с rtsp ссылкой
    cameras = await ufanet_api.get_cameras()
    for camera in cameras:
        print('RTSP link', camera.rtsp_url)
    
    # Закрытие сессии / 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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

ufanet_intercom_api-0.1.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for ufanet_intercom_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 440acb29912996ca70ad3b1e93771a1345de10290f49e3651d9852785c2e94da
MD5 0feec6aaa478c5dd521618054bc50a96
BLAKE2b-256 2756cbd901165efd0b0b884dc4d5a3a19b3b7d98e6edf2a33f1d7a7763bf9815

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