Skip to content

katana_public_api_client.api.location.get_location

katana_public_api_client.api.location.get_location

Classes

Functions

asyncio(id, *, client) async

Retrieve a location

Retrieves the details of an existing location based on ID.

Parameters:

Raises:

  • 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:

Source code in katana_public_api_client/api/location/get_location.py
async def asyncio(
    id: int,
    *,
    client: AuthenticatedClient | Client,
) -> ErrorResponse | Union["DeletableEntity", "LocationType0"] | None:
    """Retrieve a location

     Retrieves the details of an existing location based on ID.

    Args:
        id (int):

    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:
        Union[ErrorResponse, Union['DeletableEntity', 'LocationType0']]
    """

    return (
        await asyncio_detailed(
            id=id,
            client=client,
        )
    ).parsed

asyncio_detailed(id, *, client) async

Retrieve a location

Retrieves the details of an existing location based on ID.

Parameters:

Raises:

  • 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:

Source code in katana_public_api_client/api/location/get_location.py
async def asyncio_detailed(
    id: int,
    *,
    client: AuthenticatedClient | Client,
) -> Response[ErrorResponse | Union["DeletableEntity", "LocationType0"]]:
    """Retrieve a location

     Retrieves the details of an existing location based on ID.

    Args:
        id (int):

    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[Union[ErrorResponse, Union['DeletableEntity', 'LocationType0']]]
    """

    kwargs = _get_kwargs(
        id=id,
    )

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

    return _build_response(client=client, response=response)

sync(id, *, client)

Retrieve a location

Retrieves the details of an existing location based on ID.

Parameters:

Raises:

  • 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:

Source code in katana_public_api_client/api/location/get_location.py
def sync(
    id: int,
    *,
    client: AuthenticatedClient | Client,
) -> ErrorResponse | Union["DeletableEntity", "LocationType0"] | None:
    """Retrieve a location

     Retrieves the details of an existing location based on ID.

    Args:
        id (int):

    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:
        Union[ErrorResponse, Union['DeletableEntity', 'LocationType0']]
    """

    return sync_detailed(
        id=id,
        client=client,
    ).parsed

sync_detailed(id, *, client)

Retrieve a location

Retrieves the details of an existing location based on ID.

Parameters:

Raises:

  • 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:

Source code in katana_public_api_client/api/location/get_location.py
def sync_detailed(
    id: int,
    *,
    client: AuthenticatedClient | Client,
) -> Response[ErrorResponse | Union["DeletableEntity", "LocationType0"]]:
    """Retrieve a location

     Retrieves the details of an existing location based on ID.

    Args:
        id (int):

    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[Union[ErrorResponse, Union['DeletableEntity', 'LocationType0']]]
    """

    kwargs = _get_kwargs(
        id=id,
    )

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

    return _build_response(client=client, response=response)