Skip to content

incident_io_client.api.incident_memberships_v1.incident_memberships_v1_revoke

asyncio_detailed async

asyncio_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentMembershipsV1RevokeRequestBody
) -> Response[Any]

Revoke Incident Memberships V1

Revoke a user's membership of a private incident

Parameters:

Name Type Description Default
body IncidentMembershipsV1RevokeRequestBody

Example: {'incident_id': '01FCNDV6P870EA6S7TK1DSYD5H', 'user_id': '01FCQSP07Z74QMMYPDDGQB9FTG'}.

required

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[Any]

Response[Any]

Source code in incident_io_client/api/incident_memberships_v1/incident_memberships_v1_revoke.py
async def asyncio_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentMembershipsV1RevokeRequestBody,
) -> Response[Any]:
    """Revoke Incident Memberships V1

     Revoke a user's membership of a private incident

    Args:
        body (IncidentMembershipsV1RevokeRequestBody):  Example: {'incident_id':
            '01FCNDV6P870EA6S7TK1DSYD5H', 'user_id': '01FCQSP07Z74QMMYPDDGQB9FTG'}.

    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[Any]
    """

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)

sync_detailed

sync_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentMembershipsV1RevokeRequestBody
) -> Response[Any]

Revoke Incident Memberships V1

Revoke a user's membership of a private incident

Parameters:

Name Type Description Default
body IncidentMembershipsV1RevokeRequestBody

Example: {'incident_id': '01FCNDV6P870EA6S7TK1DSYD5H', 'user_id': '01FCQSP07Z74QMMYPDDGQB9FTG'}.

required

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[Any]

Response[Any]

Source code in incident_io_client/api/incident_memberships_v1/incident_memberships_v1_revoke.py
def sync_detailed(
    *,
    client: Union[AuthenticatedClient, Client],
    body: IncidentMembershipsV1RevokeRequestBody,
) -> Response[Any]:
    """Revoke Incident Memberships V1

     Revoke a user's membership of a private incident

    Args:
        body (IncidentMembershipsV1RevokeRequestBody):  Example: {'incident_id':
            '01FCNDV6P870EA6S7TK1DSYD5H', 'user_id': '01FCQSP07Z74QMMYPDDGQB9FTG'}.

    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[Any]
    """

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)