Habiticalib 0.1.0a3__py3-none-any.whl → 0.2.0a0__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.
habiticalib/__init__.py CHANGED
@@ -19,6 +19,7 @@ from .types import (
19
19
  HabiticaLoginResponse,
20
20
  HabiticaResponse,
21
21
  HabiticaScoreResponse,
22
+ HabiticaSleepResponse,
22
23
  HabiticaStatsResponse,
23
24
  HabiticaTagResponse,
24
25
  HabiticaTagsResponse,
@@ -51,6 +52,7 @@ __all__ = [
51
52
  "HabiticaLoginResponse",
52
53
  "HabiticaResponse",
53
54
  "HabiticaScoreResponse",
55
+ "HabiticaSleepResponse",
54
56
  "HabiticaStatsResponse",
55
57
  "HabiticaTagResponse",
56
58
  "HabiticaTagsResponse",
habiticalib/const.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """Constants for Habiticalib."""
2
2
 
3
- __version__ = "0.1.0a3"
3
+ __version__ = "0.2.0a0"
4
4
 
5
5
  DEFAULT_URL = "https://habitica.com/"
6
6
  ASSETS_URL = "https://habitica-assets.s3.amazonaws.com/mobileApp/images/"
habiticalib/lib.py CHANGED
@@ -35,6 +35,7 @@ from .types import (
35
35
  HabiticaLoginResponse,
36
36
  HabiticaResponse,
37
37
  HabiticaScoreResponse,
38
+ HabiticaSleepResponse,
38
39
  HabiticaStatsResponse,
39
40
  HabiticaTagResponse,
40
41
  HabiticaTagsResponse,
@@ -853,12 +854,12 @@ class Habitica:
853
854
 
854
855
  async def toggle_sleep(
855
856
  self,
856
- ) -> HabiticaResponse:
857
+ ) -> HabiticaSleepResponse:
857
858
  """Toggles the user's sleep mode in Habitica.
858
859
 
859
860
  Returns
860
861
  -------
861
- HabiticaResponse
862
+ HabiticaSleepResponse
862
863
  A response object containing the result of the sleep mode toggle,
863
864
  and the new sleep state (True if sleeping, False if not).
864
865
 
@@ -875,7 +876,7 @@ class Habitica:
875
876
  """
876
877
  url = self.url / "api/v3/user/sleep"
877
878
 
878
- return HabiticaResponse.from_json(await self._request("post", url=url))
879
+ return HabiticaSleepResponse.from_json(await self._request("post", url=url))
879
880
 
880
881
  async def revive(
881
882
  self,
habiticalib/types.py CHANGED
@@ -1131,6 +1131,13 @@ class HabiticaTaskOrderResponse(HabiticaResponse):
1131
1131
  data: list[UUID] = field(default_factory=list)
1132
1132
 
1133
1133
 
1134
+ @dataclass
1135
+ class HabiticaSleepResponse(HabiticaResponse):
1136
+ """Representation of a sleep response."""
1137
+
1138
+ data: bool
1139
+
1140
+
1134
1141
  class TaskFilter(StrEnum):
1135
1142
  """Enum representing the valid types of tasks for requests."""
1136
1143
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: Habiticalib
3
- Version: 0.1.0a3
3
+ Version: 0.2.0a0
4
4
  Summary: Asynchronous Python client library for the Habitica API
5
5
  Project-URL: Documentation, https://tr4nt0r.github.io/habiticalib/
6
6
  Project-URL: Source, https://github.com/tr4nt0r/habiticalib
@@ -0,0 +1,11 @@
1
+ habiticalib/__init__.py,sha256=gR6mjGbUe7tD3bR5UDSPXgKCtP-rfgknHi-XIP41HLk,1617
2
+ habiticalib/const.py,sha256=tJbptyPWBga1PdjCeDzutNCVsT5BIyvO9nUfFGO1D90,609
3
+ habiticalib/exceptions.py,sha256=oVFCGbHkVn0UpIKIPZPzXfvzs9US4R05ebdEn6cOpqM,1350
4
+ habiticalib/helpers.py,sha256=IRZLYWkDVLI0iVBgBMmvZ6L83KCUl-CnzGhUR_tP6Fg,4576
5
+ habiticalib/lib.py,sha256=JXx7PGrl74fJdTj_TKKzIr84Kl-hgCBDy0yvaMXXgD8,54316
6
+ habiticalib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ habiticalib/types.py,sha256=DAIKNhsc0KWSWBcfVrcP7XeZ3QlbFsuWyxt_326Lrvw,33309
8
+ habiticalib-0.2.0a0.dist-info/METADATA,sha256=d_1DFcqvff_2feSeV1blBEmOlkZ1qChdQMxKirA7ics,4156
9
+ habiticalib-0.2.0a0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
10
+ habiticalib-0.2.0a0.dist-info/licenses/LICENSE,sha256=oIinIOSJ49l1iVIRI3XGXFWt6SF7a83kEFBAY8ORwNI,1084
11
+ habiticalib-0.2.0a0.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- habiticalib/__init__.py,sha256=rwRSTk3JFaSnVKRniTC82tA5JKPSuQ-AD_mAok2QU_g,1561
2
- habiticalib/const.py,sha256=aeFLubB_xXy_3ChIDmT9Atp_aOe58oOqcAs6vepIsoI,609
3
- habiticalib/exceptions.py,sha256=oVFCGbHkVn0UpIKIPZPzXfvzs9US4R05ebdEn6cOpqM,1350
4
- habiticalib/helpers.py,sha256=IRZLYWkDVLI0iVBgBMmvZ6L83KCUl-CnzGhUR_tP6Fg,4576
5
- habiticalib/lib.py,sha256=MMs3BINdbZUszUy_DCWvFWDZKy2or1UA5R47X3GeUwI,54274
6
- habiticalib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- habiticalib/types.py,sha256=7xpxpvpDQBxsyuD241vQxeXjk6zuEC4yXzw-Of7G7Bw,33187
8
- habiticalib-0.1.0a3.dist-info/METADATA,sha256=fmMClL_kOz3sWYotJu9QZT49CfV6sEcq9sq0bfV7YZ8,4156
9
- habiticalib-0.1.0a3.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
10
- habiticalib-0.1.0a3.dist-info/licenses/LICENSE,sha256=oIinIOSJ49l1iVIRI3XGXFWt6SF7a83kEFBAY8ORwNI,1084
11
- habiticalib-0.1.0a3.dist-info/RECORD,,