Skip to content

Home Banner

thingiverse.api.home_banner

Contains endpoint functions for accessing the API

get_homebanner

asyncio(*, client) async

Get the banner on the home page

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
GetHomebannerResponse401 | GetHomebannerResponse403 | GetHomebannerResponse404 | HomebannerSchema | None

GetHomebannerResponse401 | GetHomebannerResponse403 | GetHomebannerResponse404 | HomebannerSchema

Source code in thingiverse/api/home_banner/get_homebanner.py
async def asyncio(
    *,
    client: AuthenticatedClient,
) -> (
    GetHomebannerResponse401
    | GetHomebannerResponse403
    | GetHomebannerResponse404
    | HomebannerSchema
    | None
):
    """Get the banner on the home page

    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:
        GetHomebannerResponse401 | GetHomebannerResponse403 | GetHomebannerResponse404 | HomebannerSchema
    """

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

asyncio_detailed(*, client) async

Get the banner on the home page

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[GetHomebannerResponse401 | GetHomebannerResponse403 | GetHomebannerResponse404 | HomebannerSchema]

Response[GetHomebannerResponse401 | GetHomebannerResponse403 | GetHomebannerResponse404 | HomebannerSchema]

Source code in thingiverse/api/home_banner/get_homebanner.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient,
) -> Response[
    GetHomebannerResponse401
    | GetHomebannerResponse403
    | GetHomebannerResponse404
    | HomebannerSchema
]:
    """Get the banner on the home page

    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[GetHomebannerResponse401 | GetHomebannerResponse403 | GetHomebannerResponse404 | HomebannerSchema]
    """

    kwargs = _get_kwargs()

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

    return _build_response(client=client, response=response)

sync(*, client)

Get the banner on the home page

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
GetHomebannerResponse401 | GetHomebannerResponse403 | GetHomebannerResponse404 | HomebannerSchema | None

GetHomebannerResponse401 | GetHomebannerResponse403 | GetHomebannerResponse404 | HomebannerSchema

Source code in thingiverse/api/home_banner/get_homebanner.py
def sync(
    *,
    client: AuthenticatedClient,
) -> (
    GetHomebannerResponse401
    | GetHomebannerResponse403
    | GetHomebannerResponse404
    | HomebannerSchema
    | None
):
    """Get the banner on the home page

    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:
        GetHomebannerResponse401 | GetHomebannerResponse403 | GetHomebannerResponse404 | HomebannerSchema
    """

    return sync_detailed(
        client=client,
    ).parsed

sync_detailed(*, client)

Get the banner on the home page

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[GetHomebannerResponse401 | GetHomebannerResponse403 | GetHomebannerResponse404 | HomebannerSchema]

Response[GetHomebannerResponse401 | GetHomebannerResponse403 | GetHomebannerResponse404 | HomebannerSchema]

Source code in thingiverse/api/home_banner/get_homebanner.py
def sync_detailed(
    *,
    client: AuthenticatedClient,
) -> Response[
    GetHomebannerResponse401
    | GetHomebannerResponse403
    | GetHomebannerResponse404
    | HomebannerSchema
]:
    """Get the banner on the home page

    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[GetHomebannerResponse401 | GetHomebannerResponse403 | GetHomebannerResponse404 | HomebannerSchema]
    """

    kwargs = _get_kwargs()

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

    return _build_response(client=client, response=response)