inttegro.async_resources.broadcasts

Generated public typing surface. Do not edit by hand.

 1# Generated by scripts/generate_async_resources.py; do not edit by hand.
 2"""Broadcasts resource for looking up and canceling broadcasts."""
 3from __future__ import annotations
 4from ..async_http_client import AsyncHttpClient
 5
 6class AsyncBroadcasts:
 7    """Broadcasts resource for managing broadcast chimes.
 8
 9    Access this service as ``AsyncInttegroClient.broadcasts``. Methods use the client's shared transport and return the typed resource shapes documented below.
10    """
11
12    def __init__(self, http: AsyncHttpClient):
13        self.http = http
14
15    async def lookup(self, broadcast_id: str):
16        """Lookup a broadcast by broadcast ID.
17
18        API endpoint: ``/broadcasts/lookup``.
19
20        Args:
21            broadcast_id (str): Unique identifier of the broadcast.
22
23        Returns:
24            ``Broadcast`` decoded from the documented response shape.
25
26        Raises:
27            APIError: The API rejected the request or could not complete it.
28            NetworkError: The request could not reach the Inttegro API.
29            TimeoutError: The configured request deadline elapsed.
30        """
31        return await self.http.post('/broadcasts/lookup', {'broadcast_id': broadcast_id})
32
33    async def cancel(self, broadcast_id: str):
34        """Cancel a broadcast by broadcast ID.
35
36        API endpoint: ``/broadcasts/cancel``.
37
38        Args:
39            broadcast_id (str): Unique identifier of the broadcast.
40
41        Returns:
42            ``CancelDetail`` decoded from the documented response shape.
43
44        Raises:
45            APIError: The API rejected the request or could not complete it.
46            NetworkError: The request could not reach the Inttegro API.
47            TimeoutError: The configured request deadline elapsed.
48        """
49        return await self.http.post('/broadcasts/cancel', {'broadcast_id': broadcast_id})
class AsyncBroadcasts:
 7class AsyncBroadcasts:
 8    """Broadcasts resource for managing broadcast chimes.
 9
10    Access this service as ``AsyncInttegroClient.broadcasts``. Methods use the client's shared transport and return the typed resource shapes documented below.
11    """
12
13    def __init__(self, http: AsyncHttpClient):
14        self.http = http
15
16    async def lookup(self, broadcast_id: str):
17        """Lookup a broadcast by broadcast ID.
18
19        API endpoint: ``/broadcasts/lookup``.
20
21        Args:
22            broadcast_id (str): Unique identifier of the broadcast.
23
24        Returns:
25            ``Broadcast`` decoded from the documented response shape.
26
27        Raises:
28            APIError: The API rejected the request or could not complete it.
29            NetworkError: The request could not reach the Inttegro API.
30            TimeoutError: The configured request deadline elapsed.
31        """
32        return await self.http.post('/broadcasts/lookup', {'broadcast_id': broadcast_id})
33
34    async def cancel(self, broadcast_id: str):
35        """Cancel a broadcast by broadcast ID.
36
37        API endpoint: ``/broadcasts/cancel``.
38
39        Args:
40            broadcast_id (str): Unique identifier of the broadcast.
41
42        Returns:
43            ``CancelDetail`` decoded from the documented response shape.
44
45        Raises:
46            APIError: The API rejected the request or could not complete it.
47            NetworkError: The request could not reach the Inttegro API.
48            TimeoutError: The configured request deadline elapsed.
49        """
50        return await self.http.post('/broadcasts/cancel', {'broadcast_id': broadcast_id})

Broadcasts resource for managing broadcast chimes.

Access this service as AsyncInttegroClient.broadcasts. Methods use the client's shared transport and return the typed resource shapes documented below.

AsyncBroadcasts(http: inttegro.async_http_client.AsyncHttpClient)
13    def __init__(self, http: AsyncHttpClient):
14        self.http = http
http
async def lookup(self, broadcast_id: str) -> inttegro.broadcast.Broadcast:
16    async def lookup(self, broadcast_id: str):
17        """Lookup a broadcast by broadcast ID.
18
19        API endpoint: ``/broadcasts/lookup``.
20
21        Args:
22            broadcast_id (str): Unique identifier of the broadcast.
23
24        Returns:
25            ``Broadcast`` decoded from the documented response shape.
26
27        Raises:
28            APIError: The API rejected the request or could not complete it.
29            NetworkError: The request could not reach the Inttegro API.
30            TimeoutError: The configured request deadline elapsed.
31        """
32        return await self.http.post('/broadcasts/lookup', {'broadcast_id': broadcast_id})

Lookup a broadcast by broadcast ID.

API endpoint: /broadcasts/lookup.

Arguments:
  • broadcast_id (str): Unique identifier of the broadcast.
Returns:

Broadcast decoded from the documented response shape.

Raises:
  • APIError: The API rejected the request or could not complete it.
  • NetworkError: The request could not reach the Inttegro API.
  • TimeoutError: The configured request deadline elapsed.
async def cancel(self, broadcast_id: str) -> inttegro.broadcast.CancelDetail:
34    async def cancel(self, broadcast_id: str):
35        """Cancel a broadcast by broadcast ID.
36
37        API endpoint: ``/broadcasts/cancel``.
38
39        Args:
40            broadcast_id (str): Unique identifier of the broadcast.
41
42        Returns:
43            ``CancelDetail`` decoded from the documented response shape.
44
45        Raises:
46            APIError: The API rejected the request or could not complete it.
47            NetworkError: The request could not reach the Inttegro API.
48            TimeoutError: The configured request deadline elapsed.
49        """
50        return await self.http.post('/broadcasts/cancel', {'broadcast_id': broadcast_id})

Cancel a broadcast by broadcast ID.

API endpoint: /broadcasts/cancel.

Arguments:
  • broadcast_id (str): Unique identifier of the broadcast.
Returns:

CancelDetail decoded from the documented response shape.

Raises:
  • APIError: The API rejected the request or could not complete it.
  • NetworkError: The request could not reach the Inttegro API.
  • TimeoutError: The configured request deadline elapsed.