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