Skip to content

incident_io_client.api.schedules_v2.schedules_v2_list

asyncio async

asyncio(
    *,
    client: Union[AuthenticatedClient, Client],
    page_size: Union[Unset, int] = 25,
    after: Union[Unset, str] = UNSET
) -> Optional[SchedulesV2ListResponseBody]

List Schedules V2

List configured schedules.

Parameters:

Name Type Description Default
page_size Union[Unset, int]

Default: 25.

25
after Union[Unset, str]
UNSET

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Optional[SchedulesV2ListResponseBody]

SchedulesV2ListResponseBody

Source code in incident_io_client/api/schedules_v2/schedules_v2_list.py
async def asyncio(
    *,
    client: Union[AuthenticatedClient, Client],
    page_size: Union[Unset, int] = 25,
    after: Union[Unset, str] = UNSET,
) -> Optional[SchedulesV2ListResponseBody]:
    """List Schedules V2

     List configured schedules.

    Args:
        page_size (Union[Unset, int]):  Default: 25.
        after (Union[Unset, str]):

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        SchedulesV2ListResponseBody
    """

    return (
        await asyncio_detailed(
            client=client,
            page_size=page_size,
            after=after,
        )
    ).parsed

asyncio_detailed async

asyncio_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    page_size: Union[Unset, int] = 25,
    after: Union[Unset, str] = UNSET
) -> Response[SchedulesV2ListResponseBody]

List Schedules V2

List configured schedules.

Parameters:

Name Type Description Default
page_size Union[Unset, int]

Default: 25.

25
after Union[Unset, str]
UNSET

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Response[SchedulesV2ListResponseBody]

Response[SchedulesV2ListResponseBody]

Source code in incident_io_client/api/schedules_v2/schedules_v2_list.py
async def asyncio_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    page_size: Union[Unset, int] = 25,
    after: Union[Unset, str] = UNSET,
) -> Response[SchedulesV2ListResponseBody]:
    """List Schedules V2

     List configured schedules.

    Args:
        page_size (Union[Unset, int]):  Default: 25.
        after (Union[Unset, str]):

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Response[SchedulesV2ListResponseBody]
    """

    kwargs = _get_kwargs(
        page_size=page_size,
        after=after,
    )

    response = await client.get_async_httpx_client().request(**kwargs)

    return _build_response(client=client, response=response)

sync

sync(
    *,
    client: Union[AuthenticatedClient, Client],
    page_size: Union[Unset, int] = 25,
    after: Union[Unset, str] = UNSET
) -> Optional[SchedulesV2ListResponseBody]

List Schedules V2

List configured schedules.

Parameters:

Name Type Description Default
page_size Union[Unset, int]

Default: 25.

25
after Union[Unset, str]
UNSET

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Optional[SchedulesV2ListResponseBody]

SchedulesV2ListResponseBody

Source code in incident_io_client/api/schedules_v2/schedules_v2_list.py
def sync(
    *,
    client: Union[AuthenticatedClient, Client],
    page_size: Union[Unset, int] = 25,
    after: Union[Unset, str] = UNSET,
) -> Optional[SchedulesV2ListResponseBody]:
    """List Schedules V2

     List configured schedules.

    Args:
        page_size (Union[Unset, int]):  Default: 25.
        after (Union[Unset, str]):

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        SchedulesV2ListResponseBody
    """

    return sync_detailed(
        client=client,
        page_size=page_size,
        after=after,
    ).parsed

sync_detailed

sync_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    page_size: Union[Unset, int] = 25,
    after: Union[Unset, str] = UNSET
) -> Response[SchedulesV2ListResponseBody]

List Schedules V2

List configured schedules.

Parameters:

Name Type Description Default
page_size Union[Unset, int]

Default: 25.

25
after Union[Unset, str]
UNSET

Raises:

Type Description
UnexpectedStatus

If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.

TimeoutException

If the request takes longer than Client.timeout.

Returns:

Type Description
Response[SchedulesV2ListResponseBody]

Response[SchedulesV2ListResponseBody]

Source code in incident_io_client/api/schedules_v2/schedules_v2_list.py
def sync_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    page_size: Union[Unset, int] = 25,
    after: Union[Unset, str] = UNSET,
) -> Response[SchedulesV2ListResponseBody]:
    """List Schedules V2

     List configured schedules.

    Args:
        page_size (Union[Unset, int]):  Default: 25.
        after (Union[Unset, str]):

    Raises:
        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
        httpx.TimeoutException: If the request takes longer than Client.timeout.

    Returns:
        Response[SchedulesV2ListResponseBody]
    """

    kwargs = _get_kwargs(
        page_size=page_size,
        after=after,
    )

    response = client.get_httpx_client().request(
        **kwargs,
    )

    return _build_response(client=client, response=response)