Skip to content

Program

thingiverse.api.program

Contains endpoint functions for accessing the API

get_programs_0_all

asyncio(*, client) async

Get a list of programs

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
GetPrograms0AllResponse200 | GetPrograms0AllResponse401 | GetPrograms0AllResponse403 | None

GetPrograms0AllResponse200 | GetPrograms0AllResponse401 | GetPrograms0AllResponse403

Source code in thingiverse/api/program/get_programs_0_all.py
async def asyncio(
    *,
    client: AuthenticatedClient,
) -> GetPrograms0AllResponse200 | GetPrograms0AllResponse401 | GetPrograms0AllResponse403 | None:
    """Get a list of programs

    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:
        GetPrograms0AllResponse200 | GetPrograms0AllResponse401 | GetPrograms0AllResponse403
    """

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

asyncio_detailed(*, client) async

Get a list of programs

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[GetPrograms0AllResponse200 | GetPrograms0AllResponse401 | GetPrograms0AllResponse403]

Response[GetPrograms0AllResponse200 | GetPrograms0AllResponse401 | GetPrograms0AllResponse403]

Source code in thingiverse/api/program/get_programs_0_all.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient,
) -> Response[GetPrograms0AllResponse200 | GetPrograms0AllResponse401 | GetPrograms0AllResponse403]:
    """Get a list of programs

    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[GetPrograms0AllResponse200 | GetPrograms0AllResponse401 | GetPrograms0AllResponse403]
    """

    kwargs = _get_kwargs()

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

    return _build_response(client=client, response=response)

sync(*, client)

Get a list of programs

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
GetPrograms0AllResponse200 | GetPrograms0AllResponse401 | GetPrograms0AllResponse403 | None

GetPrograms0AllResponse200 | GetPrograms0AllResponse401 | GetPrograms0AllResponse403

Source code in thingiverse/api/program/get_programs_0_all.py
def sync(
    *,
    client: AuthenticatedClient,
) -> GetPrograms0AllResponse200 | GetPrograms0AllResponse401 | GetPrograms0AllResponse403 | None:
    """Get a list of programs

    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:
        GetPrograms0AllResponse200 | GetPrograms0AllResponse401 | GetPrograms0AllResponse403
    """

    return sync_detailed(
        client=client,
    ).parsed

sync_detailed(*, client)

Get a list of programs

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[GetPrograms0AllResponse200 | GetPrograms0AllResponse401 | GetPrograms0AllResponse403]

Response[GetPrograms0AllResponse200 | GetPrograms0AllResponse401 | GetPrograms0AllResponse403]

Source code in thingiverse/api/program/get_programs_0_all.py
def sync_detailed(
    *,
    client: AuthenticatedClient,
) -> Response[GetPrograms0AllResponse200 | GetPrograms0AllResponse401 | GetPrograms0AllResponse403]:
    """Get a list of programs

    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[GetPrograms0AllResponse200 | GetPrograms0AllResponse401 | GetPrograms0AllResponse403]
    """

    kwargs = _get_kwargs()

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

    return _build_response(client=client, response=response)