Skip to content

Commit

Permalink
Merge pull request #164 from shauntarves/161-is-this-line-correct
Browse files Browse the repository at this point in the history
fix: updated endpoint URLs for scale records
  • Loading branch information
shauntarves authored Jan 8, 2024
2 parents 24f422f + 8479a78 commit 88d5420
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wyze_sdk/service/scale_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def add_heart_rate_record(self, *, did: str, user_id: str, measure_ts: int, hear
See: com.wyze.ihealth.d.b.p
"""
kwargs.update({'device_id': did, 'family_member_id': user_id, 'measure_ts': measure_ts, 'heart_rate': str(heart_rate)})
return self.api_call('/plugin/scale/get_latest_record', json=kwargs)
return self.api_call('/plugin/scale/add_heart_rate_record', json=kwargs)

def add_weight_record(self, *, did: str, mac: str, user_id: str, measure_ts: int, measure_type: int = 1, weight: float, **kwargs) -> WyzeResponse:
"""
Expand All @@ -192,7 +192,7 @@ def add_weight_record(self, *, did: str, mac: str, user_id: str, measure_ts: int
See: com.wyze.ihealth.d.b.k
"""
kwargs.update({'device_id': did, 'mac': mac, 'family_member_id': user_id, 'measure_ts': measure_ts, 'measure_type': measure_type, 'weight': weight})
return self.api_call('/plugin/scale/get_latest_record', json=kwargs)
return self.api_call('/plugin/scale/add_record', json=kwargs)

def delete_record(self, *, data_id=Union[int, Sequence[int]], **kwargs) -> WyzeResponse:
"""
Expand Down

0 comments on commit 88d5420

Please sign in to comment.