Skip to main content

API wrapper for managing the Ufanet intercom.

Project description

Ufanet Intercom API

Описание

Обёртка для API, предназначенная для управления домофонной системой провайдера Уфанет.

Description

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)

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.3.tar.gz (4.8 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.3-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ufanet_intercom_api-0.0.3.tar.gz
  • Upload date:
  • Size: 4.8 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.3.tar.gz
Algorithm Hash digest
SHA256 bd7cf034ee023cbe9483e24e908b63c125bb4ce21dd0e5c12db14399054a7f48
MD5 a341bb5b080babdfdfacf711c7d836db
BLAKE2b-256 6e7bb314330b0c66740bbb7f80b185f39609bf8759b61a35ab82ba862a7ec8ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ufanet_intercom_api-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 de5c0af562c8f7b7ec61720448a6ef2e67656115cd21cc8a75ca1065321cfeb0
MD5 d48ac3b469e23c732bdb26cf23089d01
BLAKE2b-256 e225a7e29b99627b6deb459c237bd2b291e4e7a28c5eafed3ac12e67c8e4cca4

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