Skip to content

Collection

thingiverse.api.collection

Contains endpoint functions for accessing the API

delete_collections_collection_id

asyncio(collection_id, *, client) async

Delete a collection

Apps can only delete collections they've created.

Parameters:

Name Type Description Default
collection_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
DeleteCollectionsCollectionIdResponse200 | DeleteCollectionsCollectionIdResponse401 | DeleteCollectionsCollectionIdResponse403 | DeleteCollectionsCollectionIdResponse404 | None

DeleteCollectionsCollectionIdResponse200 | DeleteCollectionsCollectionIdResponse401 | DeleteCollectionsCollectionIdResponse403 | DeleteCollectionsCollectionIdResponse404

Source code in thingiverse/api/collection/delete_collections_collection_id.py
async def asyncio(
    collection_id: int,
    *,
    client: AuthenticatedClient,
) -> (
    DeleteCollectionsCollectionIdResponse200
    | DeleteCollectionsCollectionIdResponse401
    | DeleteCollectionsCollectionIdResponse403
    | DeleteCollectionsCollectionIdResponse404
    | None
):
    """Delete a collection

     Apps can only delete collections they've created.

    Args:
        collection_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:
        DeleteCollectionsCollectionIdResponse200 | DeleteCollectionsCollectionIdResponse401 | DeleteCollectionsCollectionIdResponse403 | DeleteCollectionsCollectionIdResponse404
    """

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

asyncio_detailed(collection_id, *, client) async

Delete a collection

Apps can only delete collections they've created.

Parameters:

Name Type Description Default
collection_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[DeleteCollectionsCollectionIdResponse200 | DeleteCollectionsCollectionIdResponse401 | DeleteCollectionsCollectionIdResponse403 | DeleteCollectionsCollectionIdResponse404]

Response[DeleteCollectionsCollectionIdResponse200 | DeleteCollectionsCollectionIdResponse401 | DeleteCollectionsCollectionIdResponse403 | DeleteCollectionsCollectionIdResponse404]

Source code in thingiverse/api/collection/delete_collections_collection_id.py
async def asyncio_detailed(
    collection_id: int,
    *,
    client: AuthenticatedClient,
) -> Response[
    DeleteCollectionsCollectionIdResponse200
    | DeleteCollectionsCollectionIdResponse401
    | DeleteCollectionsCollectionIdResponse403
    | DeleteCollectionsCollectionIdResponse404
]:
    """Delete a collection

     Apps can only delete collections they've created.

    Args:
        collection_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[DeleteCollectionsCollectionIdResponse200 | DeleteCollectionsCollectionIdResponse401 | DeleteCollectionsCollectionIdResponse403 | DeleteCollectionsCollectionIdResponse404]
    """

    kwargs = _get_kwargs(
        collection_id=collection_id,
    )

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

    return _build_response(client=client, response=response)

sync(collection_id, *, client)

Delete a collection

Apps can only delete collections they've created.

Parameters:

Name Type Description Default
collection_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
DeleteCollectionsCollectionIdResponse200 | DeleteCollectionsCollectionIdResponse401 | DeleteCollectionsCollectionIdResponse403 | DeleteCollectionsCollectionIdResponse404 | None

DeleteCollectionsCollectionIdResponse200 | DeleteCollectionsCollectionIdResponse401 | DeleteCollectionsCollectionIdResponse403 | DeleteCollectionsCollectionIdResponse404

Source code in thingiverse/api/collection/delete_collections_collection_id.py
def sync(
    collection_id: int,
    *,
    client: AuthenticatedClient,
) -> (
    DeleteCollectionsCollectionIdResponse200
    | DeleteCollectionsCollectionIdResponse401
    | DeleteCollectionsCollectionIdResponse403
    | DeleteCollectionsCollectionIdResponse404
    | None
):
    """Delete a collection

     Apps can only delete collections they've created.

    Args:
        collection_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:
        DeleteCollectionsCollectionIdResponse200 | DeleteCollectionsCollectionIdResponse401 | DeleteCollectionsCollectionIdResponse403 | DeleteCollectionsCollectionIdResponse404
    """

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

sync_detailed(collection_id, *, client)

Delete a collection

Apps can only delete collections they've created.

Parameters:

Name Type Description Default
collection_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[DeleteCollectionsCollectionIdResponse200 | DeleteCollectionsCollectionIdResponse401 | DeleteCollectionsCollectionIdResponse403 | DeleteCollectionsCollectionIdResponse404]

Response[DeleteCollectionsCollectionIdResponse200 | DeleteCollectionsCollectionIdResponse401 | DeleteCollectionsCollectionIdResponse403 | DeleteCollectionsCollectionIdResponse404]

Source code in thingiverse/api/collection/delete_collections_collection_id.py
def sync_detailed(
    collection_id: int,
    *,
    client: AuthenticatedClient,
) -> Response[
    DeleteCollectionsCollectionIdResponse200
    | DeleteCollectionsCollectionIdResponse401
    | DeleteCollectionsCollectionIdResponse403
    | DeleteCollectionsCollectionIdResponse404
]:
    """Delete a collection

     Apps can only delete collections they've created.

    Args:
        collection_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[DeleteCollectionsCollectionIdResponse200 | DeleteCollectionsCollectionIdResponse401 | DeleteCollectionsCollectionIdResponse403 | DeleteCollectionsCollectionIdResponse404]
    """

    kwargs = _get_kwargs(
        collection_id=collection_id,
    )

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

    return _build_response(client=client, response=response)

delete_collections_collection_id_thing_thing_id

asyncio(collection_id, thing_id, *, client) async

Removes a thing from a collection

Apps may only remove things that they've added to a collection.

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
thing_id int

Example: 1004996.

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
DeleteCollectionsCollectionIdThingThingIdResponse401 | DeleteCollectionsCollectionIdThingThingIdResponse403 | DeleteCollectionsCollectionIdThingThingIdResponse404 | int | None

DeleteCollectionsCollectionIdThingThingIdResponse401 | DeleteCollectionsCollectionIdThingThingIdResponse403 | DeleteCollectionsCollectionIdThingThingIdResponse404 | int

Source code in thingiverse/api/collection/delete_collections_collection_id_thing_thing_id.py
async def asyncio(
    collection_id: int,
    thing_id: int,
    *,
    client: AuthenticatedClient,
) -> (
    DeleteCollectionsCollectionIdThingThingIdResponse401
    | DeleteCollectionsCollectionIdThingThingIdResponse403
    | DeleteCollectionsCollectionIdThingThingIdResponse404
    | int
    | None
):
    """Removes a thing from a collection

     Apps may only remove things that they've added to a collection.

    Args:
        collection_id (int):  Example: 1.
        thing_id (int):  Example: 1004996.

    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:
        DeleteCollectionsCollectionIdThingThingIdResponse401 | DeleteCollectionsCollectionIdThingThingIdResponse403 | DeleteCollectionsCollectionIdThingThingIdResponse404 | int
    """

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

asyncio_detailed(collection_id, thing_id, *, client) async

Removes a thing from a collection

Apps may only remove things that they've added to a collection.

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
thing_id int

Example: 1004996.

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[DeleteCollectionsCollectionIdThingThingIdResponse401 | DeleteCollectionsCollectionIdThingThingIdResponse403 | DeleteCollectionsCollectionIdThingThingIdResponse404 | int]

Response[DeleteCollectionsCollectionIdThingThingIdResponse401 | DeleteCollectionsCollectionIdThingThingIdResponse403 | DeleteCollectionsCollectionIdThingThingIdResponse404 | int]

Source code in thingiverse/api/collection/delete_collections_collection_id_thing_thing_id.py
async def asyncio_detailed(
    collection_id: int,
    thing_id: int,
    *,
    client: AuthenticatedClient,
) -> Response[
    DeleteCollectionsCollectionIdThingThingIdResponse401
    | DeleteCollectionsCollectionIdThingThingIdResponse403
    | DeleteCollectionsCollectionIdThingThingIdResponse404
    | int
]:
    """Removes a thing from a collection

     Apps may only remove things that they've added to a collection.

    Args:
        collection_id (int):  Example: 1.
        thing_id (int):  Example: 1004996.

    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[DeleteCollectionsCollectionIdThingThingIdResponse401 | DeleteCollectionsCollectionIdThingThingIdResponse403 | DeleteCollectionsCollectionIdThingThingIdResponse404 | int]
    """

    kwargs = _get_kwargs(
        collection_id=collection_id,
        thing_id=thing_id,
    )

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

    return _build_response(client=client, response=response)

sync(collection_id, thing_id, *, client)

Removes a thing from a collection

Apps may only remove things that they've added to a collection.

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
thing_id int

Example: 1004996.

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
DeleteCollectionsCollectionIdThingThingIdResponse401 | DeleteCollectionsCollectionIdThingThingIdResponse403 | DeleteCollectionsCollectionIdThingThingIdResponse404 | int | None

DeleteCollectionsCollectionIdThingThingIdResponse401 | DeleteCollectionsCollectionIdThingThingIdResponse403 | DeleteCollectionsCollectionIdThingThingIdResponse404 | int

Source code in thingiverse/api/collection/delete_collections_collection_id_thing_thing_id.py
def sync(
    collection_id: int,
    thing_id: int,
    *,
    client: AuthenticatedClient,
) -> (
    DeleteCollectionsCollectionIdThingThingIdResponse401
    | DeleteCollectionsCollectionIdThingThingIdResponse403
    | DeleteCollectionsCollectionIdThingThingIdResponse404
    | int
    | None
):
    """Removes a thing from a collection

     Apps may only remove things that they've added to a collection.

    Args:
        collection_id (int):  Example: 1.
        thing_id (int):  Example: 1004996.

    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:
        DeleteCollectionsCollectionIdThingThingIdResponse401 | DeleteCollectionsCollectionIdThingThingIdResponse403 | DeleteCollectionsCollectionIdThingThingIdResponse404 | int
    """

    return sync_detailed(
        collection_id=collection_id,
        thing_id=thing_id,
        client=client,
    ).parsed

sync_detailed(collection_id, thing_id, *, client)

Removes a thing from a collection

Apps may only remove things that they've added to a collection.

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
thing_id int

Example: 1004996.

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[DeleteCollectionsCollectionIdThingThingIdResponse401 | DeleteCollectionsCollectionIdThingThingIdResponse403 | DeleteCollectionsCollectionIdThingThingIdResponse404 | int]

Response[DeleteCollectionsCollectionIdThingThingIdResponse401 | DeleteCollectionsCollectionIdThingThingIdResponse403 | DeleteCollectionsCollectionIdThingThingIdResponse404 | int]

Source code in thingiverse/api/collection/delete_collections_collection_id_thing_thing_id.py
def sync_detailed(
    collection_id: int,
    thing_id: int,
    *,
    client: AuthenticatedClient,
) -> Response[
    DeleteCollectionsCollectionIdThingThingIdResponse401
    | DeleteCollectionsCollectionIdThingThingIdResponse403
    | DeleteCollectionsCollectionIdThingThingIdResponse404
    | int
]:
    """Removes a thing from a collection

     Apps may only remove things that they've added to a collection.

    Args:
        collection_id (int):  Example: 1.
        thing_id (int):  Example: 1004996.

    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[DeleteCollectionsCollectionIdThingThingIdResponse401 | DeleteCollectionsCollectionIdThingThingIdResponse403 | DeleteCollectionsCollectionIdThingThingIdResponse404 | int]
    """

    kwargs = _get_kwargs(
        collection_id=collection_id,
        thing_id=thing_id,
    )

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

    return _build_response(client=client, response=response)

get_collections

asyncio(*, client, page=UNSET, per_page=UNSET) async

Get list of the latest collections

Parameters:

Name Type Description Default
page int | Unset

Example: 1.

UNSET
per_page int | Unset

Example: 30.

UNSET

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
GetCollectionsResponse401 | GetCollectionsResponse403 | GetCollectionsResponse404 | list[CollectionSchema] | None

GetCollectionsResponse401 | GetCollectionsResponse403 | GetCollectionsResponse404 | list[CollectionSchema]

Source code in thingiverse/api/collection/get_collections.py
async def asyncio(
    *,
    client: AuthenticatedClient,
    page: int | Unset = UNSET,
    per_page: int | Unset = UNSET,
) -> (
    GetCollectionsResponse401
    | GetCollectionsResponse403
    | GetCollectionsResponse404
    | list[CollectionSchema]
    | None
):
    """Get list of the latest collections

    Args:
        page (int | Unset):  Example: 1.
        per_page (int | Unset):  Example: 30.

    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:
        GetCollectionsResponse401 | GetCollectionsResponse403 | GetCollectionsResponse404 | list[CollectionSchema]
    """

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

asyncio_detailed(*, client, page=UNSET, per_page=UNSET) async

Get list of the latest collections

Parameters:

Name Type Description Default
page int | Unset

Example: 1.

UNSET
per_page int | Unset

Example: 30.

UNSET

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[GetCollectionsResponse401 | GetCollectionsResponse403 | GetCollectionsResponse404 | list[CollectionSchema]]

Response[GetCollectionsResponse401 | GetCollectionsResponse403 | GetCollectionsResponse404 | list[CollectionSchema]]

Source code in thingiverse/api/collection/get_collections.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient,
    page: int | Unset = UNSET,
    per_page: int | Unset = UNSET,
) -> Response[
    GetCollectionsResponse401
    | GetCollectionsResponse403
    | GetCollectionsResponse404
    | list[CollectionSchema]
]:
    """Get list of the latest collections

    Args:
        page (int | Unset):  Example: 1.
        per_page (int | Unset):  Example: 30.

    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[GetCollectionsResponse401 | GetCollectionsResponse403 | GetCollectionsResponse404 | list[CollectionSchema]]
    """

    kwargs = _get_kwargs(
        page=page,
        per_page=per_page,
    )

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

    return _build_response(client=client, response=response)

sync(*, client, page=UNSET, per_page=UNSET)

Get list of the latest collections

Parameters:

Name Type Description Default
page int | Unset

Example: 1.

UNSET
per_page int | Unset

Example: 30.

UNSET

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
GetCollectionsResponse401 | GetCollectionsResponse403 | GetCollectionsResponse404 | list[CollectionSchema] | None

GetCollectionsResponse401 | GetCollectionsResponse403 | GetCollectionsResponse404 | list[CollectionSchema]

Source code in thingiverse/api/collection/get_collections.py
def sync(
    *,
    client: AuthenticatedClient,
    page: int | Unset = UNSET,
    per_page: int | Unset = UNSET,
) -> (
    GetCollectionsResponse401
    | GetCollectionsResponse403
    | GetCollectionsResponse404
    | list[CollectionSchema]
    | None
):
    """Get list of the latest collections

    Args:
        page (int | Unset):  Example: 1.
        per_page (int | Unset):  Example: 30.

    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:
        GetCollectionsResponse401 | GetCollectionsResponse403 | GetCollectionsResponse404 | list[CollectionSchema]
    """

    return sync_detailed(
        client=client,
        page=page,
        per_page=per_page,
    ).parsed

sync_detailed(*, client, page=UNSET, per_page=UNSET)

Get list of the latest collections

Parameters:

Name Type Description Default
page int | Unset

Example: 1.

UNSET
per_page int | Unset

Example: 30.

UNSET

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[GetCollectionsResponse401 | GetCollectionsResponse403 | GetCollectionsResponse404 | list[CollectionSchema]]

Response[GetCollectionsResponse401 | GetCollectionsResponse403 | GetCollectionsResponse404 | list[CollectionSchema]]

Source code in thingiverse/api/collection/get_collections.py
def sync_detailed(
    *,
    client: AuthenticatedClient,
    page: int | Unset = UNSET,
    per_page: int | Unset = UNSET,
) -> Response[
    GetCollectionsResponse401
    | GetCollectionsResponse403
    | GetCollectionsResponse404
    | list[CollectionSchema]
]:
    """Get list of the latest collections

    Args:
        page (int | Unset):  Example: 1.
        per_page (int | Unset):  Example: 30.

    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[GetCollectionsResponse401 | GetCollectionsResponse403 | GetCollectionsResponse404 | list[CollectionSchema]]
    """

    kwargs = _get_kwargs(
        page=page,
        per_page=per_page,
    )

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

    return _build_response(client=client, response=response)

get_collections_collection_id

asyncio(collection_id, *, client) async

Get a collection by id

Parameters:

Name Type Description Default
collection_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
CollectionSchema | GetCollectionsCollectionIdResponse401 | GetCollectionsCollectionIdResponse403 | GetCollectionsCollectionIdResponse404 | None

CollectionSchema | GetCollectionsCollectionIdResponse401 | GetCollectionsCollectionIdResponse403 | GetCollectionsCollectionIdResponse404

Source code in thingiverse/api/collection/get_collections_collection_id.py
async def asyncio(
    collection_id: int,
    *,
    client: AuthenticatedClient,
) -> (
    CollectionSchema
    | GetCollectionsCollectionIdResponse401
    | GetCollectionsCollectionIdResponse403
    | GetCollectionsCollectionIdResponse404
    | None
):
    """Get a collection by id

    Args:
        collection_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:
        CollectionSchema | GetCollectionsCollectionIdResponse401 | GetCollectionsCollectionIdResponse403 | GetCollectionsCollectionIdResponse404
    """

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

asyncio_detailed(collection_id, *, client) async

Get a collection by id

Parameters:

Name Type Description Default
collection_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[CollectionSchema | GetCollectionsCollectionIdResponse401 | GetCollectionsCollectionIdResponse403 | GetCollectionsCollectionIdResponse404]

Response[CollectionSchema | GetCollectionsCollectionIdResponse401 | GetCollectionsCollectionIdResponse403 | GetCollectionsCollectionIdResponse404]

Source code in thingiverse/api/collection/get_collections_collection_id.py
async def asyncio_detailed(
    collection_id: int,
    *,
    client: AuthenticatedClient,
) -> Response[
    CollectionSchema
    | GetCollectionsCollectionIdResponse401
    | GetCollectionsCollectionIdResponse403
    | GetCollectionsCollectionIdResponse404
]:
    """Get a collection by id

    Args:
        collection_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[CollectionSchema | GetCollectionsCollectionIdResponse401 | GetCollectionsCollectionIdResponse403 | GetCollectionsCollectionIdResponse404]
    """

    kwargs = _get_kwargs(
        collection_id=collection_id,
    )

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

    return _build_response(client=client, response=response)

sync(collection_id, *, client)

Get a collection by id

Parameters:

Name Type Description Default
collection_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
CollectionSchema | GetCollectionsCollectionIdResponse401 | GetCollectionsCollectionIdResponse403 | GetCollectionsCollectionIdResponse404 | None

CollectionSchema | GetCollectionsCollectionIdResponse401 | GetCollectionsCollectionIdResponse403 | GetCollectionsCollectionIdResponse404

Source code in thingiverse/api/collection/get_collections_collection_id.py
def sync(
    collection_id: int,
    *,
    client: AuthenticatedClient,
) -> (
    CollectionSchema
    | GetCollectionsCollectionIdResponse401
    | GetCollectionsCollectionIdResponse403
    | GetCollectionsCollectionIdResponse404
    | None
):
    """Get a collection by id

    Args:
        collection_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:
        CollectionSchema | GetCollectionsCollectionIdResponse401 | GetCollectionsCollectionIdResponse403 | GetCollectionsCollectionIdResponse404
    """

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

sync_detailed(collection_id, *, client)

Get a collection by id

Parameters:

Name Type Description Default
collection_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[CollectionSchema | GetCollectionsCollectionIdResponse401 | GetCollectionsCollectionIdResponse403 | GetCollectionsCollectionIdResponse404]

Response[CollectionSchema | GetCollectionsCollectionIdResponse401 | GetCollectionsCollectionIdResponse403 | GetCollectionsCollectionIdResponse404]

Source code in thingiverse/api/collection/get_collections_collection_id.py
def sync_detailed(
    collection_id: int,
    *,
    client: AuthenticatedClient,
) -> Response[
    CollectionSchema
    | GetCollectionsCollectionIdResponse401
    | GetCollectionsCollectionIdResponse403
    | GetCollectionsCollectionIdResponse404
]:
    """Get a collection by id

    Args:
        collection_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[CollectionSchema | GetCollectionsCollectionIdResponse401 | GetCollectionsCollectionIdResponse403 | GetCollectionsCollectionIdResponse404]
    """

    kwargs = _get_kwargs(
        collection_id=collection_id,
    )

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

    return _build_response(client=client, response=response)

get_collections_collection_id_things

asyncio(collection_id, *, client, sort=UNSET, search=UNSET, page=UNSET, per_page=UNSET, image_type=UNSET, image_size=UNSET) async

Get Things in a collection

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
sort str | Unset
UNSET
search str | Unset
UNSET
page int | Unset

Example: 1.

UNSET
per_page int | Unset

Example: 30.

UNSET
image_type str | Unset

Example: display.

UNSET
image_size str | Unset

Example: large.

UNSET

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
GetCollectionsCollectionIdThingsResponse401 | GetCollectionsCollectionIdThingsResponse403 | GetCollectionsCollectionIdThingsResponse404 | list[ShortThingSchema] | None

GetCollectionsCollectionIdThingsResponse401 | GetCollectionsCollectionIdThingsResponse403 | GetCollectionsCollectionIdThingsResponse404 | list[ShortThingSchema]

Source code in thingiverse/api/collection/get_collections_collection_id_things.py
async def asyncio(
    collection_id: int,
    *,
    client: AuthenticatedClient,
    sort: str | Unset = UNSET,
    search: str | Unset = UNSET,
    page: int | Unset = UNSET,
    per_page: int | Unset = UNSET,
    image_type: str | Unset = UNSET,
    image_size: str | Unset = UNSET,
) -> (
    GetCollectionsCollectionIdThingsResponse401
    | GetCollectionsCollectionIdThingsResponse403
    | GetCollectionsCollectionIdThingsResponse404
    | list[ShortThingSchema]
    | None
):
    """Get Things in a collection

    Args:
        collection_id (int):  Example: 1.
        sort (str | Unset):
        search (str | Unset):
        page (int | Unset):  Example: 1.
        per_page (int | Unset):  Example: 30.
        image_type (str | Unset):  Example: display.
        image_size (str | Unset):  Example: large.

    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:
        GetCollectionsCollectionIdThingsResponse401 | GetCollectionsCollectionIdThingsResponse403 | GetCollectionsCollectionIdThingsResponse404 | list[ShortThingSchema]
    """

    return (
        await asyncio_detailed(
            collection_id=collection_id,
            client=client,
            sort=sort,
            search=search,
            page=page,
            per_page=per_page,
            image_type=image_type,
            image_size=image_size,
        )
    ).parsed

asyncio_detailed(collection_id, *, client, sort=UNSET, search=UNSET, page=UNSET, per_page=UNSET, image_type=UNSET, image_size=UNSET) async

Get Things in a collection

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
sort str | Unset
UNSET
search str | Unset
UNSET
page int | Unset

Example: 1.

UNSET
per_page int | Unset

Example: 30.

UNSET
image_type str | Unset

Example: display.

UNSET
image_size str | Unset

Example: large.

UNSET

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[GetCollectionsCollectionIdThingsResponse401 | GetCollectionsCollectionIdThingsResponse403 | GetCollectionsCollectionIdThingsResponse404 | list[ShortThingSchema]]

Response[GetCollectionsCollectionIdThingsResponse401 | GetCollectionsCollectionIdThingsResponse403 | GetCollectionsCollectionIdThingsResponse404 | list[ShortThingSchema]]

Source code in thingiverse/api/collection/get_collections_collection_id_things.py
async def asyncio_detailed(
    collection_id: int,
    *,
    client: AuthenticatedClient,
    sort: str | Unset = UNSET,
    search: str | Unset = UNSET,
    page: int | Unset = UNSET,
    per_page: int | Unset = UNSET,
    image_type: str | Unset = UNSET,
    image_size: str | Unset = UNSET,
) -> Response[
    GetCollectionsCollectionIdThingsResponse401
    | GetCollectionsCollectionIdThingsResponse403
    | GetCollectionsCollectionIdThingsResponse404
    | list[ShortThingSchema]
]:
    """Get Things in a collection

    Args:
        collection_id (int):  Example: 1.
        sort (str | Unset):
        search (str | Unset):
        page (int | Unset):  Example: 1.
        per_page (int | Unset):  Example: 30.
        image_type (str | Unset):  Example: display.
        image_size (str | Unset):  Example: large.

    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[GetCollectionsCollectionIdThingsResponse401 | GetCollectionsCollectionIdThingsResponse403 | GetCollectionsCollectionIdThingsResponse404 | list[ShortThingSchema]]
    """

    kwargs = _get_kwargs(
        collection_id=collection_id,
        sort=sort,
        search=search,
        page=page,
        per_page=per_page,
        image_type=image_type,
        image_size=image_size,
    )

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

    return _build_response(client=client, response=response)

sync(collection_id, *, client, sort=UNSET, search=UNSET, page=UNSET, per_page=UNSET, image_type=UNSET, image_size=UNSET)

Get Things in a collection

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
sort str | Unset
UNSET
search str | Unset
UNSET
page int | Unset

Example: 1.

UNSET
per_page int | Unset

Example: 30.

UNSET
image_type str | Unset

Example: display.

UNSET
image_size str | Unset

Example: large.

UNSET

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
GetCollectionsCollectionIdThingsResponse401 | GetCollectionsCollectionIdThingsResponse403 | GetCollectionsCollectionIdThingsResponse404 | list[ShortThingSchema] | None

GetCollectionsCollectionIdThingsResponse401 | GetCollectionsCollectionIdThingsResponse403 | GetCollectionsCollectionIdThingsResponse404 | list[ShortThingSchema]

Source code in thingiverse/api/collection/get_collections_collection_id_things.py
def sync(
    collection_id: int,
    *,
    client: AuthenticatedClient,
    sort: str | Unset = UNSET,
    search: str | Unset = UNSET,
    page: int | Unset = UNSET,
    per_page: int | Unset = UNSET,
    image_type: str | Unset = UNSET,
    image_size: str | Unset = UNSET,
) -> (
    GetCollectionsCollectionIdThingsResponse401
    | GetCollectionsCollectionIdThingsResponse403
    | GetCollectionsCollectionIdThingsResponse404
    | list[ShortThingSchema]
    | None
):
    """Get Things in a collection

    Args:
        collection_id (int):  Example: 1.
        sort (str | Unset):
        search (str | Unset):
        page (int | Unset):  Example: 1.
        per_page (int | Unset):  Example: 30.
        image_type (str | Unset):  Example: display.
        image_size (str | Unset):  Example: large.

    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:
        GetCollectionsCollectionIdThingsResponse401 | GetCollectionsCollectionIdThingsResponse403 | GetCollectionsCollectionIdThingsResponse404 | list[ShortThingSchema]
    """

    return sync_detailed(
        collection_id=collection_id,
        client=client,
        sort=sort,
        search=search,
        page=page,
        per_page=per_page,
        image_type=image_type,
        image_size=image_size,
    ).parsed

sync_detailed(collection_id, *, client, sort=UNSET, search=UNSET, page=UNSET, per_page=UNSET, image_type=UNSET, image_size=UNSET)

Get Things in a collection

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
sort str | Unset
UNSET
search str | Unset
UNSET
page int | Unset

Example: 1.

UNSET
per_page int | Unset

Example: 30.

UNSET
image_type str | Unset

Example: display.

UNSET
image_size str | Unset

Example: large.

UNSET

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[GetCollectionsCollectionIdThingsResponse401 | GetCollectionsCollectionIdThingsResponse403 | GetCollectionsCollectionIdThingsResponse404 | list[ShortThingSchema]]

Response[GetCollectionsCollectionIdThingsResponse401 | GetCollectionsCollectionIdThingsResponse403 | GetCollectionsCollectionIdThingsResponse404 | list[ShortThingSchema]]

Source code in thingiverse/api/collection/get_collections_collection_id_things.py
def sync_detailed(
    collection_id: int,
    *,
    client: AuthenticatedClient,
    sort: str | Unset = UNSET,
    search: str | Unset = UNSET,
    page: int | Unset = UNSET,
    per_page: int | Unset = UNSET,
    image_type: str | Unset = UNSET,
    image_size: str | Unset = UNSET,
) -> Response[
    GetCollectionsCollectionIdThingsResponse401
    | GetCollectionsCollectionIdThingsResponse403
    | GetCollectionsCollectionIdThingsResponse404
    | list[ShortThingSchema]
]:
    """Get Things in a collection

    Args:
        collection_id (int):  Example: 1.
        sort (str | Unset):
        search (str | Unset):
        page (int | Unset):  Example: 1.
        per_page (int | Unset):  Example: 30.
        image_type (str | Unset):  Example: display.
        image_size (str | Unset):  Example: large.

    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[GetCollectionsCollectionIdThingsResponse401 | GetCollectionsCollectionIdThingsResponse403 | GetCollectionsCollectionIdThingsResponse404 | list[ShortThingSchema]]
    """

    kwargs = _get_kwargs(
        collection_id=collection_id,
        sort=sort,
        search=search,
        page=page,
        per_page=per_page,
        image_type=image_type,
        image_size=image_size,
    )

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

    return _build_response(client=client, response=response)

get_collections_thing_id_by_thing_id

asyncio(thing_id, *, client) async

Get a collection by id

Parameters:

Name Type Description Default
thing_id int

Example: 1004996.

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
CollectionSchema | GetCollectionsThingIdByThingIdResponse401 | GetCollectionsThingIdByThingIdResponse403 | GetCollectionsThingIdByThingIdResponse404 | None

CollectionSchema | GetCollectionsThingIdByThingIdResponse401 | GetCollectionsThingIdByThingIdResponse403 | GetCollectionsThingIdByThingIdResponse404

Source code in thingiverse/api/collection/get_collections_thing_id_by_thing_id.py
async def asyncio(
    thing_id: int,
    *,
    client: AuthenticatedClient,
) -> (
    CollectionSchema
    | GetCollectionsThingIdByThingIdResponse401
    | GetCollectionsThingIdByThingIdResponse403
    | GetCollectionsThingIdByThingIdResponse404
    | None
):
    """Get a collection by id

    Args:
        thing_id (int):  Example: 1004996.

    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:
        CollectionSchema | GetCollectionsThingIdByThingIdResponse401 | GetCollectionsThingIdByThingIdResponse403 | GetCollectionsThingIdByThingIdResponse404
    """

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

asyncio_detailed(thing_id, *, client) async

Get a collection by id

Parameters:

Name Type Description Default
thing_id int

Example: 1004996.

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[CollectionSchema | GetCollectionsThingIdByThingIdResponse401 | GetCollectionsThingIdByThingIdResponse403 | GetCollectionsThingIdByThingIdResponse404]

Response[CollectionSchema | GetCollectionsThingIdByThingIdResponse401 | GetCollectionsThingIdByThingIdResponse403 | GetCollectionsThingIdByThingIdResponse404]

Source code in thingiverse/api/collection/get_collections_thing_id_by_thing_id.py
async def asyncio_detailed(
    thing_id: int,
    *,
    client: AuthenticatedClient,
) -> Response[
    CollectionSchema
    | GetCollectionsThingIdByThingIdResponse401
    | GetCollectionsThingIdByThingIdResponse403
    | GetCollectionsThingIdByThingIdResponse404
]:
    """Get a collection by id

    Args:
        thing_id (int):  Example: 1004996.

    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[CollectionSchema | GetCollectionsThingIdByThingIdResponse401 | GetCollectionsThingIdByThingIdResponse403 | GetCollectionsThingIdByThingIdResponse404]
    """

    kwargs = _get_kwargs(
        thing_id=thing_id,
    )

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

    return _build_response(client=client, response=response)

sync(thing_id, *, client)

Get a collection by id

Parameters:

Name Type Description Default
thing_id int

Example: 1004996.

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
CollectionSchema | GetCollectionsThingIdByThingIdResponse401 | GetCollectionsThingIdByThingIdResponse403 | GetCollectionsThingIdByThingIdResponse404 | None

CollectionSchema | GetCollectionsThingIdByThingIdResponse401 | GetCollectionsThingIdByThingIdResponse403 | GetCollectionsThingIdByThingIdResponse404

Source code in thingiverse/api/collection/get_collections_thing_id_by_thing_id.py
def sync(
    thing_id: int,
    *,
    client: AuthenticatedClient,
) -> (
    CollectionSchema
    | GetCollectionsThingIdByThingIdResponse401
    | GetCollectionsThingIdByThingIdResponse403
    | GetCollectionsThingIdByThingIdResponse404
    | None
):
    """Get a collection by id

    Args:
        thing_id (int):  Example: 1004996.

    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:
        CollectionSchema | GetCollectionsThingIdByThingIdResponse401 | GetCollectionsThingIdByThingIdResponse403 | GetCollectionsThingIdByThingIdResponse404
    """

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

sync_detailed(thing_id, *, client)

Get a collection by id

Parameters:

Name Type Description Default
thing_id int

Example: 1004996.

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[CollectionSchema | GetCollectionsThingIdByThingIdResponse401 | GetCollectionsThingIdByThingIdResponse403 | GetCollectionsThingIdByThingIdResponse404]

Response[CollectionSchema | GetCollectionsThingIdByThingIdResponse401 | GetCollectionsThingIdByThingIdResponse403 | GetCollectionsThingIdByThingIdResponse404]

Source code in thingiverse/api/collection/get_collections_thing_id_by_thing_id.py
def sync_detailed(
    thing_id: int,
    *,
    client: AuthenticatedClient,
) -> Response[
    CollectionSchema
    | GetCollectionsThingIdByThingIdResponse401
    | GetCollectionsThingIdByThingIdResponse403
    | GetCollectionsThingIdByThingIdResponse404
]:
    """Get a collection by id

    Args:
        thing_id (int):  Example: 1004996.

    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[CollectionSchema | GetCollectionsThingIdByThingIdResponse401 | GetCollectionsThingIdByThingIdResponse403 | GetCollectionsThingIdByThingIdResponse404]
    """

    kwargs = _get_kwargs(
        thing_id=thing_id,
    )

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

    return _build_response(client=client, response=response)

patch_collections_collection_id

asyncio(collection_id, *, client, body=UNSET) async

Update a collection

Apps can only update collections they've created.

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
body PatchCollectionsCollectionIdBody | Unset
UNSET

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
CollectionSchema | PatchCollectionsCollectionIdResponse401 | PatchCollectionsCollectionIdResponse403 | PatchCollectionsCollectionIdResponse404 | None

CollectionSchema | PatchCollectionsCollectionIdResponse401 | PatchCollectionsCollectionIdResponse403 | PatchCollectionsCollectionIdResponse404

Source code in thingiverse/api/collection/patch_collections_collection_id.py
async def asyncio(
    collection_id: int,
    *,
    client: AuthenticatedClient,
    body: PatchCollectionsCollectionIdBody | Unset = UNSET,
) -> (
    CollectionSchema
    | PatchCollectionsCollectionIdResponse401
    | PatchCollectionsCollectionIdResponse403
    | PatchCollectionsCollectionIdResponse404
    | None
):
    """Update a collection

     Apps can only update collections they've created.

    Args:
        collection_id (int):  Example: 1.
        body (PatchCollectionsCollectionIdBody | Unset):

    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:
        CollectionSchema | PatchCollectionsCollectionIdResponse401 | PatchCollectionsCollectionIdResponse403 | PatchCollectionsCollectionIdResponse404
    """

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

asyncio_detailed(collection_id, *, client, body=UNSET) async

Update a collection

Apps can only update collections they've created.

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
body PatchCollectionsCollectionIdBody | Unset
UNSET

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[CollectionSchema | PatchCollectionsCollectionIdResponse401 | PatchCollectionsCollectionIdResponse403 | PatchCollectionsCollectionIdResponse404]

Response[CollectionSchema | PatchCollectionsCollectionIdResponse401 | PatchCollectionsCollectionIdResponse403 | PatchCollectionsCollectionIdResponse404]

Source code in thingiverse/api/collection/patch_collections_collection_id.py
async def asyncio_detailed(
    collection_id: int,
    *,
    client: AuthenticatedClient,
    body: PatchCollectionsCollectionIdBody | Unset = UNSET,
) -> Response[
    CollectionSchema
    | PatchCollectionsCollectionIdResponse401
    | PatchCollectionsCollectionIdResponse403
    | PatchCollectionsCollectionIdResponse404
]:
    """Update a collection

     Apps can only update collections they've created.

    Args:
        collection_id (int):  Example: 1.
        body (PatchCollectionsCollectionIdBody | Unset):

    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[CollectionSchema | PatchCollectionsCollectionIdResponse401 | PatchCollectionsCollectionIdResponse403 | PatchCollectionsCollectionIdResponse404]
    """

    kwargs = _get_kwargs(
        collection_id=collection_id,
        body=body,
    )

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

    return _build_response(client=client, response=response)

sync(collection_id, *, client, body=UNSET)

Update a collection

Apps can only update collections they've created.

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
body PatchCollectionsCollectionIdBody | Unset
UNSET

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
CollectionSchema | PatchCollectionsCollectionIdResponse401 | PatchCollectionsCollectionIdResponse403 | PatchCollectionsCollectionIdResponse404 | None

CollectionSchema | PatchCollectionsCollectionIdResponse401 | PatchCollectionsCollectionIdResponse403 | PatchCollectionsCollectionIdResponse404

Source code in thingiverse/api/collection/patch_collections_collection_id.py
def sync(
    collection_id: int,
    *,
    client: AuthenticatedClient,
    body: PatchCollectionsCollectionIdBody | Unset = UNSET,
) -> (
    CollectionSchema
    | PatchCollectionsCollectionIdResponse401
    | PatchCollectionsCollectionIdResponse403
    | PatchCollectionsCollectionIdResponse404
    | None
):
    """Update a collection

     Apps can only update collections they've created.

    Args:
        collection_id (int):  Example: 1.
        body (PatchCollectionsCollectionIdBody | Unset):

    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:
        CollectionSchema | PatchCollectionsCollectionIdResponse401 | PatchCollectionsCollectionIdResponse403 | PatchCollectionsCollectionIdResponse404
    """

    return sync_detailed(
        collection_id=collection_id,
        client=client,
        body=body,
    ).parsed

sync_detailed(collection_id, *, client, body=UNSET)

Update a collection

Apps can only update collections they've created.

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
body PatchCollectionsCollectionIdBody | Unset
UNSET

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[CollectionSchema | PatchCollectionsCollectionIdResponse401 | PatchCollectionsCollectionIdResponse403 | PatchCollectionsCollectionIdResponse404]

Response[CollectionSchema | PatchCollectionsCollectionIdResponse401 | PatchCollectionsCollectionIdResponse403 | PatchCollectionsCollectionIdResponse404]

Source code in thingiverse/api/collection/patch_collections_collection_id.py
def sync_detailed(
    collection_id: int,
    *,
    client: AuthenticatedClient,
    body: PatchCollectionsCollectionIdBody | Unset = UNSET,
) -> Response[
    CollectionSchema
    | PatchCollectionsCollectionIdResponse401
    | PatchCollectionsCollectionIdResponse403
    | PatchCollectionsCollectionIdResponse404
]:
    """Update a collection

     Apps can only update collections they've created.

    Args:
        collection_id (int):  Example: 1.
        body (PatchCollectionsCollectionIdBody | Unset):

    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[CollectionSchema | PatchCollectionsCollectionIdResponse401 | PatchCollectionsCollectionIdResponse403 | PatchCollectionsCollectionIdResponse404]
    """

    kwargs = _get_kwargs(
        collection_id=collection_id,
        body=body,
    )

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

    return _build_response(client=client, response=response)

post_collections

asyncio(*, client, body=UNSET) async

Create a new collection

Parameters:

Name Type Description Default
body PostCollectionsBody | Unset
UNSET

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
CollectionSchema | PostCollectionsResponse400 | PostCollectionsResponse401 | PostCollectionsResponse403 | PostCollectionsResponse404 | None

CollectionSchema | PostCollectionsResponse400 | PostCollectionsResponse401 | PostCollectionsResponse403 | PostCollectionsResponse404

Source code in thingiverse/api/collection/post_collections.py
async def asyncio(
    *,
    client: AuthenticatedClient,
    body: PostCollectionsBody | Unset = UNSET,
) -> (
    CollectionSchema
    | PostCollectionsResponse400
    | PostCollectionsResponse401
    | PostCollectionsResponse403
    | PostCollectionsResponse404
    | None
):
    """Create a new collection

    Args:
        body (PostCollectionsBody | Unset):

    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:
        CollectionSchema | PostCollectionsResponse400 | PostCollectionsResponse401 | PostCollectionsResponse403 | PostCollectionsResponse404
    """

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

asyncio_detailed(*, client, body=UNSET) async

Create a new collection

Parameters:

Name Type Description Default
body PostCollectionsBody | Unset
UNSET

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[CollectionSchema | PostCollectionsResponse400 | PostCollectionsResponse401 | PostCollectionsResponse403 | PostCollectionsResponse404]

Response[CollectionSchema | PostCollectionsResponse400 | PostCollectionsResponse401 | PostCollectionsResponse403 | PostCollectionsResponse404]

Source code in thingiverse/api/collection/post_collections.py
async def asyncio_detailed(
    *,
    client: AuthenticatedClient,
    body: PostCollectionsBody | Unset = UNSET,
) -> Response[
    CollectionSchema
    | PostCollectionsResponse400
    | PostCollectionsResponse401
    | PostCollectionsResponse403
    | PostCollectionsResponse404
]:
    """Create a new collection

    Args:
        body (PostCollectionsBody | Unset):

    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[CollectionSchema | PostCollectionsResponse400 | PostCollectionsResponse401 | PostCollectionsResponse403 | PostCollectionsResponse404]
    """

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)

sync(*, client, body=UNSET)

Create a new collection

Parameters:

Name Type Description Default
body PostCollectionsBody | Unset
UNSET

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
CollectionSchema | PostCollectionsResponse400 | PostCollectionsResponse401 | PostCollectionsResponse403 | PostCollectionsResponse404 | None

CollectionSchema | PostCollectionsResponse400 | PostCollectionsResponse401 | PostCollectionsResponse403 | PostCollectionsResponse404

Source code in thingiverse/api/collection/post_collections.py
def sync(
    *,
    client: AuthenticatedClient,
    body: PostCollectionsBody | Unset = UNSET,
) -> (
    CollectionSchema
    | PostCollectionsResponse400
    | PostCollectionsResponse401
    | PostCollectionsResponse403
    | PostCollectionsResponse404
    | None
):
    """Create a new collection

    Args:
        body (PostCollectionsBody | Unset):

    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:
        CollectionSchema | PostCollectionsResponse400 | PostCollectionsResponse401 | PostCollectionsResponse403 | PostCollectionsResponse404
    """

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

sync_detailed(*, client, body=UNSET)

Create a new collection

Parameters:

Name Type Description Default
body PostCollectionsBody | Unset
UNSET

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[CollectionSchema | PostCollectionsResponse400 | PostCollectionsResponse401 | PostCollectionsResponse403 | PostCollectionsResponse404]

Response[CollectionSchema | PostCollectionsResponse400 | PostCollectionsResponse401 | PostCollectionsResponse403 | PostCollectionsResponse404]

Source code in thingiverse/api/collection/post_collections.py
def sync_detailed(
    *,
    client: AuthenticatedClient,
    body: PostCollectionsBody | Unset = UNSET,
) -> Response[
    CollectionSchema
    | PostCollectionsResponse400
    | PostCollectionsResponse401
    | PostCollectionsResponse403
    | PostCollectionsResponse404
]:
    """Create a new collection

    Args:
        body (PostCollectionsBody | Unset):

    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[CollectionSchema | PostCollectionsResponse400 | PostCollectionsResponse401 | PostCollectionsResponse403 | PostCollectionsResponse404]
    """

    kwargs = _get_kwargs(
        body=body,
    )

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

    return _build_response(client=client, response=response)

post_collections_collection_id_like

asyncio(collection_id, *, client) async

Like/unlike Collection

Parameters:

Name Type Description Default
collection_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
PostCollectionsCollectionIdLikeResponse200 | PostCollectionsCollectionIdLikeResponse401 | PostCollectionsCollectionIdLikeResponse403 | PostCollectionsCollectionIdLikeResponse404 | None

PostCollectionsCollectionIdLikeResponse200 | PostCollectionsCollectionIdLikeResponse401 | PostCollectionsCollectionIdLikeResponse403 | PostCollectionsCollectionIdLikeResponse404

Source code in thingiverse/api/collection/post_collections_collection_id_like.py
async def asyncio(
    collection_id: int,
    *,
    client: AuthenticatedClient,
) -> (
    PostCollectionsCollectionIdLikeResponse200
    | PostCollectionsCollectionIdLikeResponse401
    | PostCollectionsCollectionIdLikeResponse403
    | PostCollectionsCollectionIdLikeResponse404
    | None
):
    """Like/unlike Collection

    Args:
        collection_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:
        PostCollectionsCollectionIdLikeResponse200 | PostCollectionsCollectionIdLikeResponse401 | PostCollectionsCollectionIdLikeResponse403 | PostCollectionsCollectionIdLikeResponse404
    """

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

asyncio_detailed(collection_id, *, client) async

Like/unlike Collection

Parameters:

Name Type Description Default
collection_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[PostCollectionsCollectionIdLikeResponse200 | PostCollectionsCollectionIdLikeResponse401 | PostCollectionsCollectionIdLikeResponse403 | PostCollectionsCollectionIdLikeResponse404]

Response[PostCollectionsCollectionIdLikeResponse200 | PostCollectionsCollectionIdLikeResponse401 | PostCollectionsCollectionIdLikeResponse403 | PostCollectionsCollectionIdLikeResponse404]

Source code in thingiverse/api/collection/post_collections_collection_id_like.py
async def asyncio_detailed(
    collection_id: int,
    *,
    client: AuthenticatedClient,
) -> Response[
    PostCollectionsCollectionIdLikeResponse200
    | PostCollectionsCollectionIdLikeResponse401
    | PostCollectionsCollectionIdLikeResponse403
    | PostCollectionsCollectionIdLikeResponse404
]:
    """Like/unlike Collection

    Args:
        collection_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[PostCollectionsCollectionIdLikeResponse200 | PostCollectionsCollectionIdLikeResponse401 | PostCollectionsCollectionIdLikeResponse403 | PostCollectionsCollectionIdLikeResponse404]
    """

    kwargs = _get_kwargs(
        collection_id=collection_id,
    )

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

    return _build_response(client=client, response=response)

sync(collection_id, *, client)

Like/unlike Collection

Parameters:

Name Type Description Default
collection_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
PostCollectionsCollectionIdLikeResponse200 | PostCollectionsCollectionIdLikeResponse401 | PostCollectionsCollectionIdLikeResponse403 | PostCollectionsCollectionIdLikeResponse404 | None

PostCollectionsCollectionIdLikeResponse200 | PostCollectionsCollectionIdLikeResponse401 | PostCollectionsCollectionIdLikeResponse403 | PostCollectionsCollectionIdLikeResponse404

Source code in thingiverse/api/collection/post_collections_collection_id_like.py
def sync(
    collection_id: int,
    *,
    client: AuthenticatedClient,
) -> (
    PostCollectionsCollectionIdLikeResponse200
    | PostCollectionsCollectionIdLikeResponse401
    | PostCollectionsCollectionIdLikeResponse403
    | PostCollectionsCollectionIdLikeResponse404
    | None
):
    """Like/unlike Collection

    Args:
        collection_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:
        PostCollectionsCollectionIdLikeResponse200 | PostCollectionsCollectionIdLikeResponse401 | PostCollectionsCollectionIdLikeResponse403 | PostCollectionsCollectionIdLikeResponse404
    """

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

sync_detailed(collection_id, *, client)

Like/unlike Collection

Parameters:

Name Type Description Default
collection_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[PostCollectionsCollectionIdLikeResponse200 | PostCollectionsCollectionIdLikeResponse401 | PostCollectionsCollectionIdLikeResponse403 | PostCollectionsCollectionIdLikeResponse404]

Response[PostCollectionsCollectionIdLikeResponse200 | PostCollectionsCollectionIdLikeResponse401 | PostCollectionsCollectionIdLikeResponse403 | PostCollectionsCollectionIdLikeResponse404]

Source code in thingiverse/api/collection/post_collections_collection_id_like.py
def sync_detailed(
    collection_id: int,
    *,
    client: AuthenticatedClient,
) -> Response[
    PostCollectionsCollectionIdLikeResponse200
    | PostCollectionsCollectionIdLikeResponse401
    | PostCollectionsCollectionIdLikeResponse403
    | PostCollectionsCollectionIdLikeResponse404
]:
    """Like/unlike Collection

    Args:
        collection_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[PostCollectionsCollectionIdLikeResponse200 | PostCollectionsCollectionIdLikeResponse401 | PostCollectionsCollectionIdLikeResponse403 | PostCollectionsCollectionIdLikeResponse404]
    """

    kwargs = _get_kwargs(
        collection_id=collection_id,
    )

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

    return _build_response(client=client, response=response)

post_collections_collection_id_move_thing_id

asyncio(collection_id, thing_id, *, client, body=UNSET) async

Move a thing between collections

Things can move a thing to any collection the user owns.

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
thing_id int

Example: 1004996.

required
body PostCollectionsCollectionIdMoveThingIdBody | Unset
UNSET

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
PostCollectionsCollectionIdMoveThingIdResponse200 | PostCollectionsCollectionIdMoveThingIdResponse401 | PostCollectionsCollectionIdMoveThingIdResponse403 | PostCollectionsCollectionIdMoveThingIdResponse404 | None

PostCollectionsCollectionIdMoveThingIdResponse200 | PostCollectionsCollectionIdMoveThingIdResponse401 | PostCollectionsCollectionIdMoveThingIdResponse403 | PostCollectionsCollectionIdMoveThingIdResponse404

Source code in thingiverse/api/collection/post_collections_collection_id_move_thing_id.py
async def asyncio(
    collection_id: int,
    thing_id: int,
    *,
    client: AuthenticatedClient,
    body: PostCollectionsCollectionIdMoveThingIdBody | Unset = UNSET,
) -> (
    PostCollectionsCollectionIdMoveThingIdResponse200
    | PostCollectionsCollectionIdMoveThingIdResponse401
    | PostCollectionsCollectionIdMoveThingIdResponse403
    | PostCollectionsCollectionIdMoveThingIdResponse404
    | None
):
    """Move a thing between collections

     Things can move a thing to any collection the user owns.

    Args:
        collection_id (int):  Example: 1.
        thing_id (int):  Example: 1004996.
        body (PostCollectionsCollectionIdMoveThingIdBody | Unset):

    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:
        PostCollectionsCollectionIdMoveThingIdResponse200 | PostCollectionsCollectionIdMoveThingIdResponse401 | PostCollectionsCollectionIdMoveThingIdResponse403 | PostCollectionsCollectionIdMoveThingIdResponse404
    """

    return (
        await asyncio_detailed(
            collection_id=collection_id,
            thing_id=thing_id,
            client=client,
            body=body,
        )
    ).parsed

asyncio_detailed(collection_id, thing_id, *, client, body=UNSET) async

Move a thing between collections

Things can move a thing to any collection the user owns.

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
thing_id int

Example: 1004996.

required
body PostCollectionsCollectionIdMoveThingIdBody | Unset
UNSET

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[PostCollectionsCollectionIdMoveThingIdResponse200 | PostCollectionsCollectionIdMoveThingIdResponse401 | PostCollectionsCollectionIdMoveThingIdResponse403 | PostCollectionsCollectionIdMoveThingIdResponse404]

Response[PostCollectionsCollectionIdMoveThingIdResponse200 | PostCollectionsCollectionIdMoveThingIdResponse401 | PostCollectionsCollectionIdMoveThingIdResponse403 | PostCollectionsCollectionIdMoveThingIdResponse404]

Source code in thingiverse/api/collection/post_collections_collection_id_move_thing_id.py
async def asyncio_detailed(
    collection_id: int,
    thing_id: int,
    *,
    client: AuthenticatedClient,
    body: PostCollectionsCollectionIdMoveThingIdBody | Unset = UNSET,
) -> Response[
    PostCollectionsCollectionIdMoveThingIdResponse200
    | PostCollectionsCollectionIdMoveThingIdResponse401
    | PostCollectionsCollectionIdMoveThingIdResponse403
    | PostCollectionsCollectionIdMoveThingIdResponse404
]:
    """Move a thing between collections

     Things can move a thing to any collection the user owns.

    Args:
        collection_id (int):  Example: 1.
        thing_id (int):  Example: 1004996.
        body (PostCollectionsCollectionIdMoveThingIdBody | Unset):

    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[PostCollectionsCollectionIdMoveThingIdResponse200 | PostCollectionsCollectionIdMoveThingIdResponse401 | PostCollectionsCollectionIdMoveThingIdResponse403 | PostCollectionsCollectionIdMoveThingIdResponse404]
    """

    kwargs = _get_kwargs(
        collection_id=collection_id,
        thing_id=thing_id,
        body=body,
    )

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

    return _build_response(client=client, response=response)

sync(collection_id, thing_id, *, client, body=UNSET)

Move a thing between collections

Things can move a thing to any collection the user owns.

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
thing_id int

Example: 1004996.

required
body PostCollectionsCollectionIdMoveThingIdBody | Unset
UNSET

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
PostCollectionsCollectionIdMoveThingIdResponse200 | PostCollectionsCollectionIdMoveThingIdResponse401 | PostCollectionsCollectionIdMoveThingIdResponse403 | PostCollectionsCollectionIdMoveThingIdResponse404 | None

PostCollectionsCollectionIdMoveThingIdResponse200 | PostCollectionsCollectionIdMoveThingIdResponse401 | PostCollectionsCollectionIdMoveThingIdResponse403 | PostCollectionsCollectionIdMoveThingIdResponse404

Source code in thingiverse/api/collection/post_collections_collection_id_move_thing_id.py
def sync(
    collection_id: int,
    thing_id: int,
    *,
    client: AuthenticatedClient,
    body: PostCollectionsCollectionIdMoveThingIdBody | Unset = UNSET,
) -> (
    PostCollectionsCollectionIdMoveThingIdResponse200
    | PostCollectionsCollectionIdMoveThingIdResponse401
    | PostCollectionsCollectionIdMoveThingIdResponse403
    | PostCollectionsCollectionIdMoveThingIdResponse404
    | None
):
    """Move a thing between collections

     Things can move a thing to any collection the user owns.

    Args:
        collection_id (int):  Example: 1.
        thing_id (int):  Example: 1004996.
        body (PostCollectionsCollectionIdMoveThingIdBody | Unset):

    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:
        PostCollectionsCollectionIdMoveThingIdResponse200 | PostCollectionsCollectionIdMoveThingIdResponse401 | PostCollectionsCollectionIdMoveThingIdResponse403 | PostCollectionsCollectionIdMoveThingIdResponse404
    """

    return sync_detailed(
        collection_id=collection_id,
        thing_id=thing_id,
        client=client,
        body=body,
    ).parsed

sync_detailed(collection_id, thing_id, *, client, body=UNSET)

Move a thing between collections

Things can move a thing to any collection the user owns.

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
thing_id int

Example: 1004996.

required
body PostCollectionsCollectionIdMoveThingIdBody | Unset
UNSET

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[PostCollectionsCollectionIdMoveThingIdResponse200 | PostCollectionsCollectionIdMoveThingIdResponse401 | PostCollectionsCollectionIdMoveThingIdResponse403 | PostCollectionsCollectionIdMoveThingIdResponse404]

Response[PostCollectionsCollectionIdMoveThingIdResponse200 | PostCollectionsCollectionIdMoveThingIdResponse401 | PostCollectionsCollectionIdMoveThingIdResponse403 | PostCollectionsCollectionIdMoveThingIdResponse404]

Source code in thingiverse/api/collection/post_collections_collection_id_move_thing_id.py
def sync_detailed(
    collection_id: int,
    thing_id: int,
    *,
    client: AuthenticatedClient,
    body: PostCollectionsCollectionIdMoveThingIdBody | Unset = UNSET,
) -> Response[
    PostCollectionsCollectionIdMoveThingIdResponse200
    | PostCollectionsCollectionIdMoveThingIdResponse401
    | PostCollectionsCollectionIdMoveThingIdResponse403
    | PostCollectionsCollectionIdMoveThingIdResponse404
]:
    """Move a thing between collections

     Things can move a thing to any collection the user owns.

    Args:
        collection_id (int):  Example: 1.
        thing_id (int):  Example: 1004996.
        body (PostCollectionsCollectionIdMoveThingIdBody | Unset):

    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[PostCollectionsCollectionIdMoveThingIdResponse200 | PostCollectionsCollectionIdMoveThingIdResponse401 | PostCollectionsCollectionIdMoveThingIdResponse403 | PostCollectionsCollectionIdMoveThingIdResponse404]
    """

    kwargs = _get_kwargs(
        collection_id=collection_id,
        thing_id=thing_id,
        body=body,
    )

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

    return _build_response(client=client, response=response)

post_collections_collection_id_thing_thing_id

asyncio(collection_id, thing_id, *, client, body=UNSET) async

Add a thing to a collection

Apps can add to any collection the user owns. Do not abuse or we'll change that.

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
thing_id int

Example: 1004996.

required
body PostCollectionsCollectionIdThingThingIdBody | Unset
UNSET

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
PostCollectionsCollectionIdThingThingIdResponse200 | PostCollectionsCollectionIdThingThingIdResponse401 | PostCollectionsCollectionIdThingThingIdResponse403 | PostCollectionsCollectionIdThingThingIdResponse404 | None

PostCollectionsCollectionIdThingThingIdResponse200 | PostCollectionsCollectionIdThingThingIdResponse401 | PostCollectionsCollectionIdThingThingIdResponse403 | PostCollectionsCollectionIdThingThingIdResponse404

Source code in thingiverse/api/collection/post_collections_collection_id_thing_thing_id.py
async def asyncio(
    collection_id: int,
    thing_id: int,
    *,
    client: AuthenticatedClient,
    body: PostCollectionsCollectionIdThingThingIdBody | Unset = UNSET,
) -> (
    PostCollectionsCollectionIdThingThingIdResponse200
    | PostCollectionsCollectionIdThingThingIdResponse401
    | PostCollectionsCollectionIdThingThingIdResponse403
    | PostCollectionsCollectionIdThingThingIdResponse404
    | None
):
    """Add a thing to a collection

     Apps can add to any collection the user owns. Do not abuse or we'll change that.

    Args:
        collection_id (int):  Example: 1.
        thing_id (int):  Example: 1004996.
        body (PostCollectionsCollectionIdThingThingIdBody | Unset):

    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:
        PostCollectionsCollectionIdThingThingIdResponse200 | PostCollectionsCollectionIdThingThingIdResponse401 | PostCollectionsCollectionIdThingThingIdResponse403 | PostCollectionsCollectionIdThingThingIdResponse404
    """

    return (
        await asyncio_detailed(
            collection_id=collection_id,
            thing_id=thing_id,
            client=client,
            body=body,
        )
    ).parsed

asyncio_detailed(collection_id, thing_id, *, client, body=UNSET) async

Add a thing to a collection

Apps can add to any collection the user owns. Do not abuse or we'll change that.

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
thing_id int

Example: 1004996.

required
body PostCollectionsCollectionIdThingThingIdBody | Unset
UNSET

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[PostCollectionsCollectionIdThingThingIdResponse200 | PostCollectionsCollectionIdThingThingIdResponse401 | PostCollectionsCollectionIdThingThingIdResponse403 | PostCollectionsCollectionIdThingThingIdResponse404]

Response[PostCollectionsCollectionIdThingThingIdResponse200 | PostCollectionsCollectionIdThingThingIdResponse401 | PostCollectionsCollectionIdThingThingIdResponse403 | PostCollectionsCollectionIdThingThingIdResponse404]

Source code in thingiverse/api/collection/post_collections_collection_id_thing_thing_id.py
async def asyncio_detailed(
    collection_id: int,
    thing_id: int,
    *,
    client: AuthenticatedClient,
    body: PostCollectionsCollectionIdThingThingIdBody | Unset = UNSET,
) -> Response[
    PostCollectionsCollectionIdThingThingIdResponse200
    | PostCollectionsCollectionIdThingThingIdResponse401
    | PostCollectionsCollectionIdThingThingIdResponse403
    | PostCollectionsCollectionIdThingThingIdResponse404
]:
    """Add a thing to a collection

     Apps can add to any collection the user owns. Do not abuse or we'll change that.

    Args:
        collection_id (int):  Example: 1.
        thing_id (int):  Example: 1004996.
        body (PostCollectionsCollectionIdThingThingIdBody | Unset):

    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[PostCollectionsCollectionIdThingThingIdResponse200 | PostCollectionsCollectionIdThingThingIdResponse401 | PostCollectionsCollectionIdThingThingIdResponse403 | PostCollectionsCollectionIdThingThingIdResponse404]
    """

    kwargs = _get_kwargs(
        collection_id=collection_id,
        thing_id=thing_id,
        body=body,
    )

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

    return _build_response(client=client, response=response)

sync(collection_id, thing_id, *, client, body=UNSET)

Add a thing to a collection

Apps can add to any collection the user owns. Do not abuse or we'll change that.

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
thing_id int

Example: 1004996.

required
body PostCollectionsCollectionIdThingThingIdBody | Unset
UNSET

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
PostCollectionsCollectionIdThingThingIdResponse200 | PostCollectionsCollectionIdThingThingIdResponse401 | PostCollectionsCollectionIdThingThingIdResponse403 | PostCollectionsCollectionIdThingThingIdResponse404 | None

PostCollectionsCollectionIdThingThingIdResponse200 | PostCollectionsCollectionIdThingThingIdResponse401 | PostCollectionsCollectionIdThingThingIdResponse403 | PostCollectionsCollectionIdThingThingIdResponse404

Source code in thingiverse/api/collection/post_collections_collection_id_thing_thing_id.py
def sync(
    collection_id: int,
    thing_id: int,
    *,
    client: AuthenticatedClient,
    body: PostCollectionsCollectionIdThingThingIdBody | Unset = UNSET,
) -> (
    PostCollectionsCollectionIdThingThingIdResponse200
    | PostCollectionsCollectionIdThingThingIdResponse401
    | PostCollectionsCollectionIdThingThingIdResponse403
    | PostCollectionsCollectionIdThingThingIdResponse404
    | None
):
    """Add a thing to a collection

     Apps can add to any collection the user owns. Do not abuse or we'll change that.

    Args:
        collection_id (int):  Example: 1.
        thing_id (int):  Example: 1004996.
        body (PostCollectionsCollectionIdThingThingIdBody | Unset):

    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:
        PostCollectionsCollectionIdThingThingIdResponse200 | PostCollectionsCollectionIdThingThingIdResponse401 | PostCollectionsCollectionIdThingThingIdResponse403 | PostCollectionsCollectionIdThingThingIdResponse404
    """

    return sync_detailed(
        collection_id=collection_id,
        thing_id=thing_id,
        client=client,
        body=body,
    ).parsed

sync_detailed(collection_id, thing_id, *, client, body=UNSET)

Add a thing to a collection

Apps can add to any collection the user owns. Do not abuse or we'll change that.

Parameters:

Name Type Description Default
collection_id int

Example: 1.

required
thing_id int

Example: 1004996.

required
body PostCollectionsCollectionIdThingThingIdBody | Unset
UNSET

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[PostCollectionsCollectionIdThingThingIdResponse200 | PostCollectionsCollectionIdThingThingIdResponse401 | PostCollectionsCollectionIdThingThingIdResponse403 | PostCollectionsCollectionIdThingThingIdResponse404]

Response[PostCollectionsCollectionIdThingThingIdResponse200 | PostCollectionsCollectionIdThingThingIdResponse401 | PostCollectionsCollectionIdThingThingIdResponse403 | PostCollectionsCollectionIdThingThingIdResponse404]

Source code in thingiverse/api/collection/post_collections_collection_id_thing_thing_id.py
def sync_detailed(
    collection_id: int,
    thing_id: int,
    *,
    client: AuthenticatedClient,
    body: PostCollectionsCollectionIdThingThingIdBody | Unset = UNSET,
) -> Response[
    PostCollectionsCollectionIdThingThingIdResponse200
    | PostCollectionsCollectionIdThingThingIdResponse401
    | PostCollectionsCollectionIdThingThingIdResponse403
    | PostCollectionsCollectionIdThingThingIdResponse404
]:
    """Add a thing to a collection

     Apps can add to any collection the user owns. Do not abuse or we'll change that.

    Args:
        collection_id (int):  Example: 1.
        thing_id (int):  Example: 1004996.
        body (PostCollectionsCollectionIdThingThingIdBody | Unset):

    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[PostCollectionsCollectionIdThingThingIdResponse200 | PostCollectionsCollectionIdThingThingIdResponse401 | PostCollectionsCollectionIdThingThingIdResponse403 | PostCollectionsCollectionIdThingThingIdResponse404]
    """

    kwargs = _get_kwargs(
        collection_id=collection_id,
        thing_id=thing_id,
        body=body,
    )

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

    return _build_response(client=client, response=response)

post_collections_collection_id_watch

asyncio(collection_id, *, client) async

Watch/unwatch Collection

Parameters:

Name Type Description Default
collection_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
PostCollectionsCollectionIdWatchResponse200 | PostCollectionsCollectionIdWatchResponse401 | PostCollectionsCollectionIdWatchResponse403 | PostCollectionsCollectionIdWatchResponse404 | None

PostCollectionsCollectionIdWatchResponse200 | PostCollectionsCollectionIdWatchResponse401 | PostCollectionsCollectionIdWatchResponse403 | PostCollectionsCollectionIdWatchResponse404

Source code in thingiverse/api/collection/post_collections_collection_id_watch.py
async def asyncio(
    collection_id: int,
    *,
    client: AuthenticatedClient,
) -> (
    PostCollectionsCollectionIdWatchResponse200
    | PostCollectionsCollectionIdWatchResponse401
    | PostCollectionsCollectionIdWatchResponse403
    | PostCollectionsCollectionIdWatchResponse404
    | None
):
    """Watch/unwatch Collection

    Args:
        collection_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:
        PostCollectionsCollectionIdWatchResponse200 | PostCollectionsCollectionIdWatchResponse401 | PostCollectionsCollectionIdWatchResponse403 | PostCollectionsCollectionIdWatchResponse404
    """

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

asyncio_detailed(collection_id, *, client) async

Watch/unwatch Collection

Parameters:

Name Type Description Default
collection_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[PostCollectionsCollectionIdWatchResponse200 | PostCollectionsCollectionIdWatchResponse401 | PostCollectionsCollectionIdWatchResponse403 | PostCollectionsCollectionIdWatchResponse404]

Response[PostCollectionsCollectionIdWatchResponse200 | PostCollectionsCollectionIdWatchResponse401 | PostCollectionsCollectionIdWatchResponse403 | PostCollectionsCollectionIdWatchResponse404]

Source code in thingiverse/api/collection/post_collections_collection_id_watch.py
async def asyncio_detailed(
    collection_id: int,
    *,
    client: AuthenticatedClient,
) -> Response[
    PostCollectionsCollectionIdWatchResponse200
    | PostCollectionsCollectionIdWatchResponse401
    | PostCollectionsCollectionIdWatchResponse403
    | PostCollectionsCollectionIdWatchResponse404
]:
    """Watch/unwatch Collection

    Args:
        collection_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[PostCollectionsCollectionIdWatchResponse200 | PostCollectionsCollectionIdWatchResponse401 | PostCollectionsCollectionIdWatchResponse403 | PostCollectionsCollectionIdWatchResponse404]
    """

    kwargs = _get_kwargs(
        collection_id=collection_id,
    )

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

    return _build_response(client=client, response=response)

sync(collection_id, *, client)

Watch/unwatch Collection

Parameters:

Name Type Description Default
collection_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
PostCollectionsCollectionIdWatchResponse200 | PostCollectionsCollectionIdWatchResponse401 | PostCollectionsCollectionIdWatchResponse403 | PostCollectionsCollectionIdWatchResponse404 | None

PostCollectionsCollectionIdWatchResponse200 | PostCollectionsCollectionIdWatchResponse401 | PostCollectionsCollectionIdWatchResponse403 | PostCollectionsCollectionIdWatchResponse404

Source code in thingiverse/api/collection/post_collections_collection_id_watch.py
def sync(
    collection_id: int,
    *,
    client: AuthenticatedClient,
) -> (
    PostCollectionsCollectionIdWatchResponse200
    | PostCollectionsCollectionIdWatchResponse401
    | PostCollectionsCollectionIdWatchResponse403
    | PostCollectionsCollectionIdWatchResponse404
    | None
):
    """Watch/unwatch Collection

    Args:
        collection_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:
        PostCollectionsCollectionIdWatchResponse200 | PostCollectionsCollectionIdWatchResponse401 | PostCollectionsCollectionIdWatchResponse403 | PostCollectionsCollectionIdWatchResponse404
    """

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

sync_detailed(collection_id, *, client)

Watch/unwatch Collection

Parameters:

Name Type Description Default
collection_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[PostCollectionsCollectionIdWatchResponse200 | PostCollectionsCollectionIdWatchResponse401 | PostCollectionsCollectionIdWatchResponse403 | PostCollectionsCollectionIdWatchResponse404]

Response[PostCollectionsCollectionIdWatchResponse200 | PostCollectionsCollectionIdWatchResponse401 | PostCollectionsCollectionIdWatchResponse403 | PostCollectionsCollectionIdWatchResponse404]

Source code in thingiverse/api/collection/post_collections_collection_id_watch.py
def sync_detailed(
    collection_id: int,
    *,
    client: AuthenticatedClient,
) -> Response[
    PostCollectionsCollectionIdWatchResponse200
    | PostCollectionsCollectionIdWatchResponse401
    | PostCollectionsCollectionIdWatchResponse403
    | PostCollectionsCollectionIdWatchResponse404
]:
    """Watch/unwatch Collection

    Args:
        collection_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[PostCollectionsCollectionIdWatchResponse200 | PostCollectionsCollectionIdWatchResponse401 | PostCollectionsCollectionIdWatchResponse403 | PostCollectionsCollectionIdWatchResponse404]
    """

    kwargs = _get_kwargs(
        collection_id=collection_id,
    )

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

    return _build_response(client=client, response=response)