abacusai.health_data_source
Classes
A connected Health data source (a wearable/device via Terra). |
Module Contents
- class abacusai.health_data_source.HealthDataSource(client, healthDataSourceId=None, provider=None, kind=None, status=None, errorDetail=None, connectedAt=None, lastSyncedAt=None, isLiveSync=None, isImported=None)
Bases:
abacusai.return_class.AbstractApiClassA connected Health data source (a wearable/device via Terra).
- Parameters:
client (ApiClient) – An authenticated API Client instance
healthDataSourceId (id) – The ID of the data source.
provider (str) – Provider key (oura, fitbit, garmin, …).
kind (str) – wearable | nutrition | cgm.
status (str) – active | syncing | error | disconnected.
errorDetail (str) – Why this source is not delivering what it should. Set when status is ‘error’, and also on an ‘active’ source that the provider has only partly authorized — the connection works and some data flows, but a whole category of it never will until the user re-grants (see ingestion._missing_scope_advisory). Clients must branch on status for severity rather than treating the presence of this field as failure.
connectedAt (str) – When the source was connected.
lastSyncedAt (str) – Last successful sync time.
isLiveSync (bool) – Whether this source is refreshed by pulling the aggregator, as opposed to not being refreshable at all. Not derivable from provider: an Apple Health row is live only once the iOS SDK has connected it, so clients must branch on this rather than on a hardcoded provider list.
isImported (bool) – Whether this source’s readings were uploaded from a file rather than pulled from a provider connection. Such a row reports is_live_sync False, and this is what lets a client say WHY — readings that never came from a device, rather than a connection that broke — which only the server can tell, since the fact behind it (the absent aggregator_ref) is never exposed.
- health_data_source_id = None
- provider = None
- kind = None
- status = None
- error_detail = None
- connected_at = None
- last_synced_at = None
- is_live_sync = None
- is_imported = None
- deprecated_keys
- __repr__()