inttegro.async_resources.schedules

Generated public typing surface. Do not edit by hand.

 1# Generated by scripts/generate_async_resources.py; do not edit by hand.
 2"""Schedules resource for looking up and canceling scheduled chimes."""
 3from __future__ import annotations
 4from ..async_http_client import AsyncHttpClient
 5
 6class AsyncSchedules:
 7    """Schedules resource for managing scheduled chimes.
 8
 9    Access this service as ``AsyncInttegroClient.schedules``. 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, schedule_id: str):
16        """Lookup a scheduled chime by schedule ID.
17
18        API endpoint: ``/schedules/lookup``.
19
20        Args:
21            schedule_id (str): Unique identifier of the schedule.
22
23        Returns:
24            ``Schedule`` 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('/schedules/lookup', {'schedule_id': schedule_id})
32
33    async def cancel(self, schedule_id: str):
34        """Cancel a scheduled chime by schedule ID.
35
36        API endpoint: ``/schedules/cancel``.
37
38        Args:
39            schedule_id (str): Unique identifier of the schedule.
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('/schedules/cancel', {'schedule_id': schedule_id})
class AsyncSchedules:
 7class AsyncSchedules:
 8    """Schedules resource for managing scheduled chimes.
 9
10    Access this service as ``AsyncInttegroClient.schedules``. 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, schedule_id: str):
17        """Lookup a scheduled chime by schedule ID.
18
19        API endpoint: ``/schedules/lookup``.
20
21        Args:
22            schedule_id (str): Unique identifier of the schedule.
23
24        Returns:
25            ``Schedule`` 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('/schedules/lookup', {'schedule_id': schedule_id})
33
34    async def cancel(self, schedule_id: str):
35        """Cancel a scheduled chime by schedule ID.
36
37        API endpoint: ``/schedules/cancel``.
38
39        Args:
40            schedule_id (str): Unique identifier of the schedule.
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('/schedules/cancel', {'schedule_id': schedule_id})

Schedules resource for managing scheduled chimes.

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

AsyncSchedules(http: inttegro.async_http_client.AsyncHttpClient)
13    def __init__(self, http: AsyncHttpClient):
14        self.http = http
http
async def lookup(self, schedule_id: str) -> inttegro.schedule.Schedule:
16    async def lookup(self, schedule_id: str):
17        """Lookup a scheduled chime by schedule ID.
18
19        API endpoint: ``/schedules/lookup``.
20
21        Args:
22            schedule_id (str): Unique identifier of the schedule.
23
24        Returns:
25            ``Schedule`` 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('/schedules/lookup', {'schedule_id': schedule_id})

Lookup a scheduled chime by schedule ID.

API endpoint: /schedules/lookup.

Arguments:
  • schedule_id (str): Unique identifier of the schedule.
Returns:

Schedule 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, schedule_id: str) -> inttegro.schedule.CancelDetail:
34    async def cancel(self, schedule_id: str):
35        """Cancel a scheduled chime by schedule ID.
36
37        API endpoint: ``/schedules/cancel``.
38
39        Args:
40            schedule_id (str): Unique identifier of the schedule.
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('/schedules/cancel', {'schedule_id': schedule_id})

Cancel a scheduled chime by schedule ID.

API endpoint: /schedules/cancel.

Arguments:
  • schedule_id (str): Unique identifier of the schedule.
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.