DomoMetric
DomoMetric ¶
DomoMetric
dataclass
¶
DomoMetric(
auth: DomoAuth,
id: str,
raw: dict = dict(),
name: str | None = None,
owner_id: str | None = None,
)
Bases: DomoEntity
Domo Metric entity.
from_dict
classmethod
¶
from_dict(
auth: DomoAuth, obj: dict[str, Any]
) -> DomoMetric
Convert an API response dict to a DomoMetric instance.
Source code in src/crew_dcs/classes/DomoMetric.py
33 34 35 36 37 38 39 40 41 42 | |
get_by_id
async
classmethod
¶
get_by_id(
auth: DomoAuth, metric_id: str, **kwargs
) -> DomoMetric
Not supported — the Metrics API has no individual get-by-ID endpoint.
Source code in src/crew_dcs/classes/DomoMetric.py
44 45 46 47 48 49 50 51 52 53 54 55 | |
get_entity_by_id
async
classmethod
¶
get_entity_by_id(
entity_id: str, auth: DomoAuth, **kwargs
) -> DomoMetric
Internal wrapper used by the base refresh() method.
Source code in src/crew_dcs/classes/DomoMetric.py
57 58 59 60 61 62 | |
update_owner
async
¶
update_owner(
to_user_id: str,
*,
context: RouteContext | None = None,
**context_kwargs
) -> DomoMetric
Transfer ownership of this metric to another user.
Source code in src/crew_dcs/classes/DomoMetric.py
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
DomoMetrics
dataclass
¶
DomoMetrics(auth: DomoAuth)
Bases: DomoManager
Collection manager for DomoMetric objects.
get
async
¶
get(
filter_body: dict | None = None,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> list[DomoMetric] | ResponseGetData
Retrieve metrics, optionally filtered by a custom body.
Source code in src/crew_dcs/classes/DomoMetric.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | |
get_owned_by
async
¶
get_owned_by(
user_id: str,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> list[DomoMetric] | ResponseGetData
Retrieve all metrics owned by a specific user.
Source code in src/crew_dcs/classes/DomoMetric.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | |
transfer_all
async
¶
transfer_all(
from_user_id: str,
to_user_id: str,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Transfer all metrics from one user to another.
Source code in src/crew_dcs/classes/DomoMetric.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |