sweatstack 0.33.0__py3-none-any.whl → 0.34.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
sweatstack/client.py CHANGED
@@ -458,7 +458,7 @@ class Client(OAuth2Mixin, DelegationMixin):
458
458
  start: date | str,
459
459
  end: date | str | None = None,
460
460
  metrics: list[Metric | str] | None = None,
461
- adaptive_sampling_on: Literal["power", "speed"] | None = None,
461
+ adaptive_sampling_on: Literal[Metric.power, Metric.speed] | Literal["power", "speed"] | None = None,
462
462
  ) -> pd.DataFrame:
463
463
  if sport and sports:
464
464
  raise ValueError("Cannot specify both sport and sports")
@@ -467,19 +467,16 @@ class Client(OAuth2Mixin, DelegationMixin):
467
467
  elif sports is None:
468
468
  sports = []
469
469
 
470
- sports = self._enums_to_strings(sports)
471
- metrics = self._enums_to_strings(metrics)
472
-
473
470
  params = {
474
- "sports": sports,
475
- "start": start,
471
+ "sports": self._enums_to_strings(sports),
472
+ "start": start
476
473
  }
477
474
  if end is not None:
478
475
  params["end"] = end
479
476
  if metrics is not None:
480
- params["metrics"] = metrics
477
+ params["metrics"] = self._enums_to_strings(metrics)
481
478
  if adaptive_sampling_on is not None:
482
- params["adaptive_sampling_on"] = adaptive_sampling_on
479
+ params["adaptive_sampling_on"] = self._enums_to_strings([adaptive_sampling_on])[0]
483
480
 
484
481
  with self._http_client() as client:
485
482
  response = client.get(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sweatstack
3
- Version: 0.33.0
3
+ Version: 0.34.0
4
4
  Summary: The official Python client for SweatStack
5
5
  Author-email: Aart Goossens <aart@gssns.io>
6
6
  Requires-Python: >=3.9
@@ -1,6 +1,6 @@
1
1
  sweatstack/__init__.py,sha256=tiVfgKlswRPaDMEy0gA7u8rveqEYZTA_kyB9lJ3J6Sc,21
2
2
  sweatstack/cli.py,sha256=N1NWOgEZR2yaJvIXxo9qvp_jFlypZYb0nujpbVNYQ6A,720
3
- sweatstack/client.py,sha256=NpZjqDION-cets4B87brCL3sFMBAuNiP9_HKc9l6Cy4,24898
3
+ sweatstack/client.py,sha256=7i9BLZBz67OrERtbS9h3R5h6GHYmco7kbvs0GZdc1C4,24913
4
4
  sweatstack/constants.py,sha256=fGO6ksOv5HeISv9lHRoYm4besW1GTveXS8YD3K0ljg0,41
5
5
  sweatstack/ipython_init.py,sha256=zBGUlMFkdpLvsNpOpwrNaKRUpUZhzaICvH8ODJgMPcI,229
6
6
  sweatstack/jupyterlab_oauth2_startup.py,sha256=eZ6xi0Sa4hO4vUanimq0SqjduHtiywCURSDNWk_I-7s,1200
@@ -11,7 +11,7 @@ sweatstack/streamlit.py,sha256=gsgiIDW-INGTvF24ANnX5LJ17ZxnvXx95sjSmtcTlnY,8062
11
11
  sweatstack/sweatshell.py,sha256=MYLNcWbOdceqKJ3S0Pe8dwHXEeYsGJNjQoYUXpMTftA,333
12
12
  sweatstack/utils.py,sha256=3K97OSWQy5KZ97QiBbW4Kx1wDGxwyA96ZWpwIbkcQZc,2090
13
13
  sweatstack/Sweat Stack examples/Getting started.ipynb,sha256=k2hiSffWecoQ0VxjdpDcgFzBXDQiYEebhnAYlu8cgX8,6335204
14
- sweatstack-0.33.0.dist-info/METADATA,sha256=ULQomRjnvxecWkP2Rg3B6VruKNM26_yfuXZ1jQsTWwI,775
15
- sweatstack-0.33.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
- sweatstack-0.33.0.dist-info/entry_points.txt,sha256=kCzOUQI3dqbTpEYqtgYDeiKFaqaA7BMlV6D24BMzCFU,208
17
- sweatstack-0.33.0.dist-info/RECORD,,
14
+ sweatstack-0.34.0.dist-info/METADATA,sha256=GA_2D0iHIbNZL7n03qMS80a_yyzkROtNPD2qxWzC5JE,775
15
+ sweatstack-0.34.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
+ sweatstack-0.34.0.dist-info/entry_points.txt,sha256=kCzOUQI3dqbTpEYqtgYDeiKFaqaA7BMlV6D24BMzCFU,208
17
+ sweatstack-0.34.0.dist-info/RECORD,,