Skip to content

Sitewide Notification

thingiverse.api.sitewidenotification

Contains endpoint functions for accessing the API

get_sitewidenotification

asyncio(*, client) async

Get a sitewidenotification

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
GetSitewidenotificationResponse401 | GetSitewidenotificationResponse403 | GetSitewidenotificationResponse404 | None | SitewidenotificationSchemaType0 | None

GetSitewidenotificationResponse401 | GetSitewidenotificationResponse403 | GetSitewidenotificationResponse404 | None | SitewidenotificationSchemaType0

Source code in thingiverse/api/sitewidenotification/get_sitewidenotification.py
async def asyncio(
    *,
    client: AuthenticatedClient,
) -> (
    GetSitewidenotificationResponse401
    | GetSitewidenotificationResponse403
    | GetSitewidenotificationResponse404
    | None
    | SitewidenotificationSchemaType0
    | None
):
    """Get a sitewidenotification

    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:
        GetSitewidenotificationResponse401 | GetSitewidenotificationResponse403 | GetSitewidenotificationResponse404 | None | SitewidenotificationSchemaType0
    """

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

asyncio_detailed(*, client) async

Get a sitewidenotification

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[GetSitewidenotificationResponse401 | GetSitewidenotificationResponse403 | GetSitewidenotificationResponse404 | None | SitewidenotificationSchemaType0]

Response[GetSitewidenotificationResponse401 | GetSitewidenotificationResponse403 | GetSitewidenotificationResponse404 | None | SitewidenotificationSchemaType0]

Source code in thingiverse/api/sitewidenotification/get_sitewidenotification.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient,
) -> Response[
    GetSitewidenotificationResponse401
    | GetSitewidenotificationResponse403
    | GetSitewidenotificationResponse404
    | None
    | SitewidenotificationSchemaType0
]:
    """Get a sitewidenotification

    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[GetSitewidenotificationResponse401 | GetSitewidenotificationResponse403 | GetSitewidenotificationResponse404 | None | SitewidenotificationSchemaType0]
    """

    kwargs = _get_kwargs()

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

    return _build_response(client=client, response=response)

sync(*, client)

Get a sitewidenotification

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
GetSitewidenotificationResponse401 | GetSitewidenotificationResponse403 | GetSitewidenotificationResponse404 | None | SitewidenotificationSchemaType0 | None

GetSitewidenotificationResponse401 | GetSitewidenotificationResponse403 | GetSitewidenotificationResponse404 | None | SitewidenotificationSchemaType0

Source code in thingiverse/api/sitewidenotification/get_sitewidenotification.py
def sync(
    *,
    client: AuthenticatedClient,
) -> (
    GetSitewidenotificationResponse401
    | GetSitewidenotificationResponse403
    | GetSitewidenotificationResponse404
    | None
    | SitewidenotificationSchemaType0
    | None
):
    """Get a sitewidenotification

    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:
        GetSitewidenotificationResponse401 | GetSitewidenotificationResponse403 | GetSitewidenotificationResponse404 | None | SitewidenotificationSchemaType0
    """

    return sync_detailed(
        client=client,
    ).parsed

sync_detailed(*, client)

Get a sitewidenotification

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[GetSitewidenotificationResponse401 | GetSitewidenotificationResponse403 | GetSitewidenotificationResponse404 | None | SitewidenotificationSchemaType0]

Response[GetSitewidenotificationResponse401 | GetSitewidenotificationResponse403 | GetSitewidenotificationResponse404 | None | SitewidenotificationSchemaType0]

Source code in thingiverse/api/sitewidenotification/get_sitewidenotification.py
def sync_detailed(
    *,
    client: AuthenticatedClient,
) -> Response[
    GetSitewidenotificationResponse401
    | GetSitewidenotificationResponse403
    | GetSitewidenotificationResponse404
    | None
    | SitewidenotificationSchemaType0
]:
    """Get a sitewidenotification

    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[GetSitewidenotificationResponse401 | GetSitewidenotificationResponse403 | GetSitewidenotificationResponse404 | None | SitewidenotificationSchemaType0]
    """

    kwargs = _get_kwargs()

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

    return _build_response(client=client, response=response)

get_sitewidenotification_id

asyncio(id, *, client) async

Get a sitewidenotification by id

Parameters:

Name Type Description Default
id int

Example: 1.

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
GetSitewidenotificationIdResponse401 | GetSitewidenotificationIdResponse403 | GetSitewidenotificationIdResponse404 | None | SitewidenotificationSchemaType0 | None

GetSitewidenotificationIdResponse401 | GetSitewidenotificationIdResponse403 | GetSitewidenotificationIdResponse404 | None | SitewidenotificationSchemaType0

Source code in thingiverse/api/sitewidenotification/get_sitewidenotification_id.py
async def asyncio(
    id: int,
    *,
    client: AuthenticatedClient,
) -> (
    GetSitewidenotificationIdResponse401
    | GetSitewidenotificationIdResponse403
    | GetSitewidenotificationIdResponse404
    | None
    | SitewidenotificationSchemaType0
    | None
):
    """Get a sitewidenotification by id

    Args:
        id (int):  Example: 1.

    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:
        GetSitewidenotificationIdResponse401 | GetSitewidenotificationIdResponse403 | GetSitewidenotificationIdResponse404 | None | SitewidenotificationSchemaType0
    """

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

asyncio_detailed(id, *, client) async

Get a sitewidenotification by id

Parameters:

Name Type Description Default
id int

Example: 1.

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[GetSitewidenotificationIdResponse401 | GetSitewidenotificationIdResponse403 | GetSitewidenotificationIdResponse404 | None | SitewidenotificationSchemaType0]

Response[GetSitewidenotificationIdResponse401 | GetSitewidenotificationIdResponse403 | GetSitewidenotificationIdResponse404 | None | SitewidenotificationSchemaType0]

Source code in thingiverse/api/sitewidenotification/get_sitewidenotification_id.py
async def asyncio_detailed(
    id: int,
    *,
    client: AuthenticatedClient,
) -> Response[
    GetSitewidenotificationIdResponse401
    | GetSitewidenotificationIdResponse403
    | GetSitewidenotificationIdResponse404
    | None
    | SitewidenotificationSchemaType0
]:
    """Get a sitewidenotification by id

    Args:
        id (int):  Example: 1.

    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[GetSitewidenotificationIdResponse401 | GetSitewidenotificationIdResponse403 | GetSitewidenotificationIdResponse404 | None | SitewidenotificationSchemaType0]
    """

    kwargs = _get_kwargs(
        id=id,
    )

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

    return _build_response(client=client, response=response)

sync(id, *, client)

Get a sitewidenotification by id

Parameters:

Name Type Description Default
id int

Example: 1.

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
GetSitewidenotificationIdResponse401 | GetSitewidenotificationIdResponse403 | GetSitewidenotificationIdResponse404 | None | SitewidenotificationSchemaType0 | None

GetSitewidenotificationIdResponse401 | GetSitewidenotificationIdResponse403 | GetSitewidenotificationIdResponse404 | None | SitewidenotificationSchemaType0

Source code in thingiverse/api/sitewidenotification/get_sitewidenotification_id.py
def sync(
    id: int,
    *,
    client: AuthenticatedClient,
) -> (
    GetSitewidenotificationIdResponse401
    | GetSitewidenotificationIdResponse403
    | GetSitewidenotificationIdResponse404
    | None
    | SitewidenotificationSchemaType0
    | None
):
    """Get a sitewidenotification by id

    Args:
        id (int):  Example: 1.

    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:
        GetSitewidenotificationIdResponse401 | GetSitewidenotificationIdResponse403 | GetSitewidenotificationIdResponse404 | None | SitewidenotificationSchemaType0
    """

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

sync_detailed(id, *, client)

Get a sitewidenotification by id

Parameters:

Name Type Description Default
id int

Example: 1.

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[GetSitewidenotificationIdResponse401 | GetSitewidenotificationIdResponse403 | GetSitewidenotificationIdResponse404 | None | SitewidenotificationSchemaType0]

Response[GetSitewidenotificationIdResponse401 | GetSitewidenotificationIdResponse403 | GetSitewidenotificationIdResponse404 | None | SitewidenotificationSchemaType0]

Source code in thingiverse/api/sitewidenotification/get_sitewidenotification_id.py
def sync_detailed(
    id: int,
    *,
    client: AuthenticatedClient,
) -> Response[
    GetSitewidenotificationIdResponse401
    | GetSitewidenotificationIdResponse403
    | GetSitewidenotificationIdResponse404
    | None
    | SitewidenotificationSchemaType0
]:
    """Get a sitewidenotification by id

    Args:
        id (int):  Example: 1.

    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[GetSitewidenotificationIdResponse401 | GetSitewidenotificationIdResponse403 | GetSitewidenotificationIdResponse404 | None | SitewidenotificationSchemaType0]
    """

    kwargs = _get_kwargs(
        id=id,
    )

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

    return _build_response(client=client, response=response)