Skip to content

Allow for more asset lookups than just by HREF #2

@redmer

Description

@redmer

If e.g. attribute 801 is unique, do Tenant.asset_by({ 801: "value" }).

async def asset_by(self, *, href: str) -> Asset:
"""Get the asset with its href ID."""
d = await self.api.GET(href)
return Asset.model_validate_json(d.content)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions