Habiticalib 0.4.0rc0__tar.gz → 0.4.0rc1__tar.gz
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-0.4.0rc0 → habiticalib-0.4.0rc1}/.github/dependabot.yml +6 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/.github/labels.yml +50 -23
- habiticalib-0.4.0rc1/.github/release-drafter.yml +96 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/.github/workflows/draft.yml +9 -2
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/.github/workflows/labeler.yml +1 -1
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/.gitignore +2 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/PKG-INFO +1 -2
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/pyproject.toml +1 -2
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/src/habiticalib/__init__.py +4 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/src/habiticalib/const.py +1 -1
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/src/habiticalib/lib.py +89 -32
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/src/habiticalib/typedefs.py +145 -3
- habiticalib-0.4.0rc1/tests/__snapshots__/test_group.ambr +4 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_serialize.ambr +4 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_user.ambr +2 -2
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/conftest.py +4 -0
- habiticalib-0.4.0rc1/tests/fixtures/party.json +132 -0
- habiticalib-0.4.0rc1/tests/test_group.py +16 -0
- habiticalib-0.4.0rc0/.github/release-drafter.yml +0 -99
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/.cruft.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/.editorconfig +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/.github/FUNDING.yml +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/.github/workflows/build.yml +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/.github/workflows/documentation.yml +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/.pre-commit-config.yaml +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/.vscode/settings.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/LICENSE +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/README.md +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/docs/index.md +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/docs/reference/habiticalib.md +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/mkdocs.yml +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/src/habiticalib/exceptions.py +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/src/habiticalib/ha.py +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/src/habiticalib/helpers.py +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/src/habiticalib/py.typed +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__init__.py +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_avatar/test_generate_avatar.png +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_avatar/test_generate_avatar_from_styles[animated_background].png +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_avatar/test_generate_avatar_from_styles[default].png +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_avatar/test_generate_avatar_from_styles[kickstarter_backer_gear].png +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_avatar/test_generate_avatar_from_styles[kickstarter_pet_mount].png +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_avatar/test_generate_avatar_from_styles[seafoam].png +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_avatar/test_generate_avatar_from_styles[shinySeed].png +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_avatar/test_generate_avatar_from_styles[sleeping].png +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_avatar/test_generate_avatar_from_styles[snowball].png +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_avatar/test_generate_avatar_from_styles[special_0].png +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_avatar/test_generate_avatar_from_styles[special_1].png +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_avatar/test_generate_avatar_from_styles[spookySparkles].png +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_avatar/test_generate_avatar_from_styles[weapon_critical].png +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_avatar/test_generate_avatar_from_styles[with_chair].png +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_avatar/test_generate_avatar_to_file.png +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_avatar.ambr +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_login.ambr +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/__snapshots__/test_tasks.ambr +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/empty_data.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/login.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/task.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/task_order.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/tasks.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/user.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/user_anonymized.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/user_styles.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/user_styles_animated_background.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/user_styles_kickstarter.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/user_styles_kickstarter_pets.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/user_styles_seafoam.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/user_styles_shinySeed.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/user_styles_sleeping.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/user_styles_snowball.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/user_styles_special_0.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/user_styles_special_1.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/user_styles_spookySparkles.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/user_styles_weapon_critical.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/user_styles_with_chair.json +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/test_avatar.py +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/test_login.py +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/test_serialize.py +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/test_tasks.py +0 -0
- {habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/test_user.py +0 -0
@@ -4,7 +4,13 @@ updates:
|
|
4
4
|
directory: "/"
|
5
5
|
schedule:
|
6
6
|
interval: "weekly"
|
7
|
+
labels:
|
8
|
+
- ":recycle: dependencies"
|
9
|
+
- ":snake: python"
|
7
10
|
- package-ecosystem: "github-actions"
|
8
11
|
directory: "/"
|
9
12
|
schedule:
|
10
13
|
interval: "weekly"
|
14
|
+
labels:
|
15
|
+
- ":recycle: dependencies"
|
16
|
+
- ":clapper: github_actions"
|
@@ -4,63 +4,90 @@
|
|
4
4
|
#
|
5
5
|
# The repository labels will be automatically configured using this file and
|
6
6
|
# the GitHub Action https://github.com/marketplace/actions/github-labeler.
|
7
|
-
- name: breaking
|
7
|
+
- name: ':boom: breaking change'
|
8
|
+
from_name: breaking
|
8
9
|
description: Breaking Changes
|
9
10
|
color: bfd4f2
|
10
|
-
- name: bug
|
11
|
+
- name: ':ghost: bug'
|
12
|
+
from_name: bug
|
11
13
|
description: Something isn't working
|
12
14
|
color: d73a4a
|
13
|
-
- name: build
|
15
|
+
- name: ':building_construction: build'
|
16
|
+
from_name: build
|
14
17
|
description: Build System and Dependencies
|
15
18
|
color: bfdadc
|
16
|
-
- name: ci
|
19
|
+
- name: ':construction_worker_woman: ci'
|
20
|
+
from_name: ci
|
17
21
|
description: Continuous Integration
|
18
22
|
color: 4a97d6
|
19
|
-
- name: dependencies
|
23
|
+
- name: ':recycle: dependencies'
|
24
|
+
from_name: dependencies
|
20
25
|
description: Pull requests that update a dependency file
|
21
26
|
color: 0366d6
|
22
|
-
- name: documentation
|
27
|
+
- name: ':book: documentation'
|
28
|
+
from_name: documentation
|
23
29
|
description: Improvements or additions to documentation
|
24
30
|
color: 0075ca
|
25
|
-
- name: duplicate
|
31
|
+
- name: ':roll_eyes: duplicate'
|
32
|
+
from_name: duplicate
|
26
33
|
description: This issue or pull request already exists
|
27
34
|
color: cfd3d7
|
28
|
-
- name: feature
|
35
|
+
- name: ':rocket: feature'
|
36
|
+
from_name: enhancement
|
29
37
|
description: New feature or request
|
30
38
|
color: a2eeef
|
31
|
-
- name: github_actions
|
39
|
+
- name: ':clapper: github_actions'
|
40
|
+
from_name: github_actions
|
32
41
|
description: Pull requests that update Github_actions code
|
33
|
-
color:
|
34
|
-
- name: good first issue
|
42
|
+
color: '000000'
|
43
|
+
- name: ':hatching_chick: good first issue'
|
44
|
+
from_name: good first issue
|
35
45
|
description: Good for newcomers
|
36
46
|
color: 7057ff
|
37
|
-
- name: help wanted
|
47
|
+
- name: ':pray: help wanted'
|
48
|
+
from_name: help wanted
|
38
49
|
description: Extra attention is needed
|
39
|
-
color: 008672
|
40
|
-
- name: invalid
|
50
|
+
color: '008672'
|
51
|
+
- name: ':no_entry_sign: invalid'
|
52
|
+
from_name: invalid
|
41
53
|
description: This doesn't seem right
|
42
54
|
color: e4e669
|
43
|
-
- name: performance
|
55
|
+
- name: ':racing_car: performance'
|
56
|
+
from_name: performance
|
44
57
|
description: Performance
|
45
|
-
color:
|
46
|
-
- name: python
|
58
|
+
color: '016175'
|
59
|
+
- name: ':snake: python'
|
60
|
+
from_name: python
|
47
61
|
description: Pull requests that update Python code
|
48
62
|
color: 2b67c6
|
49
|
-
- name: question
|
63
|
+
- name: ':question: question'
|
64
|
+
from_name: question
|
50
65
|
description: Further information is requested
|
51
66
|
color: d876e3
|
52
|
-
- name: code quality
|
67
|
+
- name: ':sparkles: code quality'
|
68
|
+
from_name: code quality
|
53
69
|
description: Code quality improvements
|
54
70
|
color: ef67c4
|
55
|
-
- name: deprecation
|
71
|
+
- name: ':file_cabinet: deprecation'
|
72
|
+
from_name: deprecation
|
56
73
|
description: Removals and Deprecations
|
57
74
|
color: 9ae7ea
|
58
|
-
- name: style
|
75
|
+
- name: ':nail_care: style'
|
76
|
+
from_name: style
|
59
77
|
description: Style
|
60
78
|
color: c120e5
|
61
|
-
- name: testing
|
79
|
+
- name: ':test_tube: testing'
|
80
|
+
from_name: testing
|
62
81
|
description: Pull request that adds tests
|
63
82
|
color: b1fc6f
|
64
|
-
- name: wontfix
|
83
|
+
- name: ':woman_shrugging: wontfix'
|
84
|
+
from_name: wontfix
|
65
85
|
description: This will not be worked on
|
66
86
|
color: ffffff
|
87
|
+
- name: ':arrow_up: bump'
|
88
|
+
description: Bump the version
|
89
|
+
color: 3C5D34
|
90
|
+
- name: ':sparkles: enhancement'
|
91
|
+
color: CBF8DA
|
92
|
+
- name: 'skip-changelog'
|
93
|
+
color: D3D3D3
|
@@ -0,0 +1,96 @@
|
|
1
|
+
name-template: 'v$RESOLVED_VERSION'
|
2
|
+
tag-template: 'v$RESOLVED_VERSION'
|
3
|
+
|
4
|
+
|
5
|
+
categories:
|
6
|
+
- title: '💥 Breaking changes'
|
7
|
+
labels:
|
8
|
+
- ':boom: breaking change'
|
9
|
+
- title: '🚀 New Features'
|
10
|
+
labels:
|
11
|
+
- ':rocket: feature'
|
12
|
+
- title: '👻 Bug Fixes'
|
13
|
+
labels:
|
14
|
+
- ':ghost: bug'
|
15
|
+
- title: '⏳ Deprecations'
|
16
|
+
labels:
|
17
|
+
- ':file_cabinet: deprecation'
|
18
|
+
- title: '📃 Documentation'
|
19
|
+
labels:
|
20
|
+
- ':book: documentation'
|
21
|
+
- title: '🧰 Maintenance'
|
22
|
+
labels:
|
23
|
+
- ':building_construction: build'
|
24
|
+
- ':construction_worker_woman: ci'
|
25
|
+
- ':clapper: github_actions'
|
26
|
+
collapse-after: 5
|
27
|
+
- title: '🔬 Other updates'
|
28
|
+
labels:
|
29
|
+
- ':nail_care: style'
|
30
|
+
- ':test_tube: testing'
|
31
|
+
- ':racing_car: performance'
|
32
|
+
- ':sparkles: code quality'
|
33
|
+
- ':sparkles: enhancement'
|
34
|
+
- title: '🧩 Dependency Updates'
|
35
|
+
labels:
|
36
|
+
- ':recycle: dependencies'
|
37
|
+
collapse-after: 5
|
38
|
+
exclude-labels:
|
39
|
+
- ':arrow_up: bump'
|
40
|
+
- 'skip-changelog'
|
41
|
+
|
42
|
+
autolabeler:
|
43
|
+
- label: ':rocket: feature'
|
44
|
+
title:
|
45
|
+
- '/adds/i'
|
46
|
+
- '/add method/i'
|
47
|
+
- label: ':ghost: bug'
|
48
|
+
title:
|
49
|
+
- '/fix/i'
|
50
|
+
- label: ':sparkles: code quality'
|
51
|
+
title:
|
52
|
+
- '/Refactor/i'
|
53
|
+
- label: ':test_tube: testing'
|
54
|
+
files:
|
55
|
+
- 'test_*'
|
56
|
+
- 'conftest.py'
|
57
|
+
- label: ':book: documentation'
|
58
|
+
title:
|
59
|
+
- '/docs:/i'
|
60
|
+
files:
|
61
|
+
- '*.md'
|
62
|
+
- 'mkdocs.yml'
|
63
|
+
- label: ':construction_worker_woman: ci'
|
64
|
+
files:
|
65
|
+
- '.github/*'
|
66
|
+
- label: ':recycle: dependencies'
|
67
|
+
title:
|
68
|
+
- '/bump/i'
|
69
|
+
- label: ':file_cabinet: deprecation'
|
70
|
+
title:
|
71
|
+
- '/Deprecate/i'
|
72
|
+
|
73
|
+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
74
|
+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
|
75
|
+
exclude-contributors:
|
76
|
+
- 'dependabot'
|
77
|
+
|
78
|
+
version-resolver:
|
79
|
+
major:
|
80
|
+
labels:
|
81
|
+
- ':boom: breaking change'
|
82
|
+
minor:
|
83
|
+
labels:
|
84
|
+
- ':rocket: feature'
|
85
|
+
default: patch
|
86
|
+
|
87
|
+
template: |
|
88
|
+
## What's Changed
|
89
|
+
|
90
|
+
$CHANGES
|
91
|
+
|
92
|
+
Contributors: $CONTRIBUTORS
|
93
|
+
|
94
|
+
replacers:
|
95
|
+
- search: '/(?:and )?@dependabot(?:\[bot\])?,?/g'
|
96
|
+
replace: ''
|
@@ -4,16 +4,23 @@ on:
|
|
4
4
|
push:
|
5
5
|
branches:
|
6
6
|
- main
|
7
|
+
# pull_request event is required only for autolabeler
|
8
|
+
pull_request:
|
9
|
+
types: [opened, reopened, synchronize]
|
10
|
+
pull_request_target:
|
11
|
+
types: [opened, reopened, synchronize]
|
12
|
+
|
13
|
+
permissions:
|
14
|
+
contents: read
|
7
15
|
|
8
16
|
jobs:
|
9
17
|
update-draft:
|
10
18
|
runs-on: ubuntu-latest
|
11
19
|
permissions:
|
12
20
|
contents: write
|
21
|
+
pull-requests: write
|
13
22
|
steps:
|
14
23
|
# Drafts your next Release notes as Pull Requests are merged into "main"
|
15
24
|
- uses: release-drafter/release-drafter@v6
|
16
|
-
with:
|
17
|
-
disable-autolabeler: false
|
18
25
|
env:
|
19
26
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: Habiticalib
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.0rc1
|
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
|
@@ -12,7 +12,6 @@ Classifier: Operating System :: OS Independent
|
|
12
12
|
Classifier: Programming Language :: Python :: 3 :: Only
|
13
13
|
Requires-Python: >=3.12
|
14
14
|
Requires-Dist: aiohttp~=3.9
|
15
|
-
Requires-Dist: habitipy~=0.3.3
|
16
15
|
Requires-Dist: mashumaro~=3.13
|
17
16
|
Requires-Dist: orjson~=3.10
|
18
17
|
Requires-Dist: pillow~=11.0
|
@@ -59,7 +59,9 @@ from .typedefs import (
|
|
59
59
|
HabiticaDeleteWebhookResponse,
|
60
60
|
HabiticaErrorResponse,
|
61
61
|
HabiticaGroupMembersResponse,
|
62
|
+
HabiticaGroupsResponse,
|
62
63
|
HabiticaLoginResponse,
|
64
|
+
HabiticaMessageResponse,
|
63
65
|
HabiticaQuestResponse,
|
64
66
|
HabiticaResponse,
|
65
67
|
HabiticaScoreResponse,
|
@@ -219,8 +221,10 @@ __all__ = [
|
|
219
221
|
"HabiticaException",
|
220
222
|
"HabiticaGroupMembersResponse",
|
221
223
|
"HabiticaGroupMembersResponse",
|
224
|
+
"HabiticaGroupsResponse",
|
222
225
|
"HabiticaLoginResponse",
|
223
226
|
"HabiticaLoginResponse",
|
227
|
+
"HabiticaMessageResponse",
|
224
228
|
"HabiticaQuestResponse",
|
225
229
|
"HabiticaQuestResponse",
|
226
230
|
"HabiticaResponse",
|
@@ -7,10 +7,9 @@ from http import HTTPStatus
|
|
7
7
|
from io import BytesIO
|
8
8
|
import logging
|
9
9
|
from operator import add
|
10
|
-
from typing import IO, TYPE_CHECKING,
|
10
|
+
from typing import IO, TYPE_CHECKING, Self
|
11
11
|
|
12
12
|
from aiohttp import ClientError, ClientResponseError, ClientSession
|
13
|
-
from habitipy.aio import HabitipyAsync # type: ignore[import-untyped]
|
14
13
|
from PIL import Image
|
15
14
|
from yarl import URL
|
16
15
|
|
@@ -47,7 +46,9 @@ from .typedefs import (
|
|
47
46
|
HabiticaDeleteWebhookResponse,
|
48
47
|
HabiticaErrorResponse,
|
49
48
|
HabiticaGroupMembersResponse,
|
49
|
+
HabiticaGroupsResponse,
|
50
50
|
HabiticaLoginResponse,
|
51
|
+
HabiticaMessageResponse,
|
51
52
|
HabiticaQuestResponse,
|
52
53
|
HabiticaResponse,
|
53
54
|
HabiticaScoreResponse,
|
@@ -2051,36 +2052,6 @@ class Habitica:
|
|
2051
2052
|
|
2052
2053
|
return avatar
|
2053
2054
|
|
2054
|
-
async def habitipy(self) -> HabitipyAsync:
|
2055
|
-
"""Create a Habitipy instance."""
|
2056
|
-
|
2057
|
-
_session = self._session
|
2058
|
-
_headers = self._headers
|
2059
|
-
loop = asyncio.get_running_loop()
|
2060
|
-
|
2061
|
-
class HAHabitipyAsync(HabitipyAsync):
|
2062
|
-
"""Closure API class to hold session."""
|
2063
|
-
|
2064
|
-
def __call__(self, **kwargs) -> Any:
|
2065
|
-
"""Pass session to habitipy."""
|
2066
|
-
return super().__call__(_session, **kwargs)
|
2067
|
-
|
2068
|
-
def _make_headers(self) -> dict[str, str]:
|
2069
|
-
"""Inject headers."""
|
2070
|
-
headers = super()._make_headers()
|
2071
|
-
headers.update(_headers)
|
2072
|
-
return headers
|
2073
|
-
|
2074
|
-
return await loop.run_in_executor(
|
2075
|
-
None,
|
2076
|
-
HAHabitipyAsync,
|
2077
|
-
{
|
2078
|
-
"url": str(self.url),
|
2079
|
-
"login": self._headers.get("X-API-USER"),
|
2080
|
-
"password": self._headers.get("X-API-KEY"),
|
2081
|
-
}, # type: ignore[var-annotated]
|
2082
|
-
)
|
2083
|
-
|
2084
2055
|
async def create_webhook(
|
2085
2056
|
self,
|
2086
2057
|
webhook: TaskActivity
|
@@ -2183,3 +2154,89 @@ class Habitica:
|
|
2183
2154
|
return HabiticaWebhookResponse.from_json(
|
2184
2155
|
await self._request("put", url, json=webhook.to_dict(omit_none=True))
|
2185
2156
|
)
|
2157
|
+
|
2158
|
+
async def get_group(self, group_id: UUID | None = None) -> HabiticaGroupsResponse:
|
2159
|
+
"""
|
2160
|
+
Retrieve a user's group or party information.
|
2161
|
+
|
2162
|
+
Parameters
|
2163
|
+
----------
|
2164
|
+
group_id : UUID or None, optional
|
2165
|
+
The unique identifier of the group to retrieve. If not provided,
|
2166
|
+
the user's party information will be retrieved instead.
|
2167
|
+
|
2168
|
+
Returns
|
2169
|
+
-------
|
2170
|
+
HabiticaGroupsResponse
|
2171
|
+
An object representing the response containing the group or party details.
|
2172
|
+
"""
|
2173
|
+
|
2174
|
+
url = self.url / "api/v3/groups" / (str(group_id) if group_id else "party")
|
2175
|
+
|
2176
|
+
return HabiticaGroupsResponse.from_json(await self._request("get", url))
|
2177
|
+
|
2178
|
+
async def send_group_message(
|
2179
|
+
self, message: str, group_id: UUID | None = None
|
2180
|
+
) -> HabiticaMessageResponse:
|
2181
|
+
"""Send a message to a specific group.
|
2182
|
+
|
2183
|
+
Parameters
|
2184
|
+
----------
|
2185
|
+
message : str
|
2186
|
+
The content of the message to be sent.
|
2187
|
+
group_id : UUID
|
2188
|
+
The unique identifier of the group to send the message to.
|
2189
|
+
If not provided, the user's party will be used.
|
2190
|
+
|
2191
|
+
Returns
|
2192
|
+
-------
|
2193
|
+
HabiticaMessageResponse
|
2194
|
+
An object representing the response containing the sent message details.
|
2195
|
+
|
2196
|
+
Raises
|
2197
|
+
------
|
2198
|
+
NotAuthorizedError
|
2199
|
+
If the user is not authorized to send messages to the specified group
|
2200
|
+
because the chat privileges have been revoked.
|
2201
|
+
NotFoundError
|
2202
|
+
If the specified group could not be found.
|
2203
|
+
"""
|
2204
|
+
url = (
|
2205
|
+
self.url
|
2206
|
+
/ "api/v3/groups"
|
2207
|
+
/ (str(group_id) if group_id else "party")
|
2208
|
+
/ "chat"
|
2209
|
+
)
|
2210
|
+
return HabiticaMessageResponse.from_json(
|
2211
|
+
await self._request("post", url, json={"message": message})
|
2212
|
+
)
|
2213
|
+
|
2214
|
+
async def send_private_message(
|
2215
|
+
self, message: str, to_user_id: UUID
|
2216
|
+
) -> HabiticaMessageResponse:
|
2217
|
+
"""Send a private message to a specific user.
|
2218
|
+
|
2219
|
+
Parameters
|
2220
|
+
----------
|
2221
|
+
message : str
|
2222
|
+
The content of the private message to be sent.
|
2223
|
+
to_user_id : UUID
|
2224
|
+
The unique identifier of the user to send the message to.
|
2225
|
+
|
2226
|
+
Returns
|
2227
|
+
-------
|
2228
|
+
HabiticaMessageResponse
|
2229
|
+
An object representing the response containing the sent message details.
|
2230
|
+
|
2231
|
+
Raises
|
2232
|
+
------
|
2233
|
+
NotFoundError
|
2234
|
+
If the specified user could not be found.
|
2235
|
+
"""
|
2236
|
+
url = self.url / "api/v3/members/send-private-message"
|
2237
|
+
|
2238
|
+
return HabiticaMessageResponse.from_json(
|
2239
|
+
await self._request(
|
2240
|
+
"post", url, json={"message": message, "toUserId": str(to_user_id)}
|
2241
|
+
)
|
2242
|
+
)
|
@@ -559,6 +559,9 @@ class QuestParty(BaseModel):
|
|
559
559
|
RSVPNeeded: bool | None = None
|
560
560
|
key: str | None = None
|
561
561
|
completed: str | None = None
|
562
|
+
active: bool | None = None
|
563
|
+
leader: UUID | None = None
|
564
|
+
members: dict[UUID, bool] = field(default_factory=dict)
|
562
565
|
|
563
566
|
|
564
567
|
@dataclass(kw_only=True)
|
@@ -1621,7 +1624,7 @@ class ItemListContent(BaseModel):
|
|
1621
1624
|
bundles: ItemListEntry
|
1622
1625
|
|
1623
1626
|
|
1624
|
-
@dataclass
|
1627
|
+
@dataclass(kw_only=True)
|
1625
1628
|
class GearEntry(BaseModel):
|
1626
1629
|
"""GearEntry content data."""
|
1627
1630
|
|
@@ -1767,7 +1770,7 @@ class PetEntry(BaseModel):
|
|
1767
1770
|
text: str | None = None
|
1768
1771
|
|
1769
1772
|
|
1770
|
-
@dataclass
|
1773
|
+
@dataclass(kw_only=True)
|
1771
1774
|
class InventoryItemEntry(BaseModel):
|
1772
1775
|
"""Inventory item content data."""
|
1773
1776
|
|
@@ -1779,6 +1782,36 @@ class InventoryItemEntry(BaseModel):
|
|
1779
1782
|
key: str | None = None
|
1780
1783
|
notes: str | None = None
|
1781
1784
|
canDrop: bool | None = None
|
1785
|
+
sellWarningNote: str | None = None
|
1786
|
+
|
1787
|
+
|
1788
|
+
@dataclass(kw_only=True)
|
1789
|
+
class Achievment(BaseModel):
|
1790
|
+
"""An achievment."""
|
1791
|
+
|
1792
|
+
icon: str
|
1793
|
+
titleKey: str
|
1794
|
+
textKey: str
|
1795
|
+
key: str
|
1796
|
+
text2Key: str | None = None
|
1797
|
+
notificationText: str | None = None
|
1798
|
+
singularTitleKey: str | None = None
|
1799
|
+
singularTextKey: str | None = None
|
1800
|
+
pluralTitleKey: str | None = None
|
1801
|
+
pluralTextKey: str | None = None
|
1802
|
+
modalTextKey: str | None = None
|
1803
|
+
|
1804
|
+
|
1805
|
+
@dataclass(kw_only=True)
|
1806
|
+
class Incentive(BaseModel):
|
1807
|
+
"""A login incentive."""
|
1808
|
+
|
1809
|
+
rewardKey: list[str] = field(default_factory=list)
|
1810
|
+
nextRewardAt: int = 500
|
1811
|
+
prevRewardKey: int = 0
|
1812
|
+
reward: list[QuestsContent | GearEntry | InventoryItemEntry | Achievment] = field(
|
1813
|
+
default_factory=list
|
1814
|
+
)
|
1782
1815
|
|
1783
1816
|
|
1784
1817
|
@dataclass
|
@@ -1836,7 +1869,7 @@ class ContentData(BaseModel):
|
|
1836
1869
|
# tasksByCategory
|
1837
1870
|
# userDefaultsMobile
|
1838
1871
|
# faq
|
1839
|
-
|
1872
|
+
loginIncentives: dict[str, Incentive]
|
1840
1873
|
|
1841
1874
|
|
1842
1875
|
@dataclass
|
@@ -1870,3 +1903,112 @@ class HabiticaCastSkillResponse(HabiticaResponse):
|
|
1870
1903
|
"""Representation of a cast skill response."""
|
1871
1904
|
|
1872
1905
|
data: UserTasks
|
1906
|
+
|
1907
|
+
|
1908
|
+
class GroupPrivacy(StrEnum):
|
1909
|
+
"""Group privacy."""
|
1910
|
+
|
1911
|
+
PRIVATE = "private"
|
1912
|
+
PUBLIC = "public"
|
1913
|
+
|
1914
|
+
|
1915
|
+
class GroupType(StrEnum):
|
1916
|
+
"""Group type."""
|
1917
|
+
|
1918
|
+
GUILD = "guild"
|
1919
|
+
PARTY = "party"
|
1920
|
+
|
1921
|
+
|
1922
|
+
@dataclass(kw_only=True)
|
1923
|
+
class LeaderOnly(BaseModel):
|
1924
|
+
"""Group leaderOnly data."""
|
1925
|
+
|
1926
|
+
challenges: bool
|
1927
|
+
getGems: bool
|
1928
|
+
|
1929
|
+
|
1930
|
+
@dataclass(kw_only=True)
|
1931
|
+
class GroupLeader(BaseModel):
|
1932
|
+
"""Group leader data."""
|
1933
|
+
|
1934
|
+
id: UUID
|
1935
|
+
auth: AuthUser
|
1936
|
+
profile: ProfileUser
|
1937
|
+
|
1938
|
+
|
1939
|
+
@dataclass(kw_only=True)
|
1940
|
+
class ChatMsgInfo(BaseModel):
|
1941
|
+
"""Chat message info."""
|
1942
|
+
|
1943
|
+
type: str | None = None
|
1944
|
+
user: str | None = None
|
1945
|
+
quest: str | None = None
|
1946
|
+
items: dict[str, int] | None = None
|
1947
|
+
|
1948
|
+
|
1949
|
+
@dataclass(kw_only=True)
|
1950
|
+
class ChatMsg(BaseModel):
|
1951
|
+
"""Chat message."""
|
1952
|
+
|
1953
|
+
id: UUID
|
1954
|
+
flagCount: int
|
1955
|
+
text: str
|
1956
|
+
unformattedText: str
|
1957
|
+
info: ChatMsgInfo
|
1958
|
+
timestamp: datetime = field(
|
1959
|
+
metadata=field_options(
|
1960
|
+
deserialize=serialize_datetime,
|
1961
|
+
)
|
1962
|
+
)
|
1963
|
+
likes: dict[UUID, bool]
|
1964
|
+
client: str | None = None
|
1965
|
+
uuid: UUID | str
|
1966
|
+
groupId: UUID | None = None
|
1967
|
+
user: str | None = None
|
1968
|
+
username: str | None = None
|
1969
|
+
userStyles: Avatar | None = None
|
1970
|
+
sent: bool | None = None
|
1971
|
+
ownerId: UUID | None = None
|
1972
|
+
uniqueMessageId: UUID | None = None
|
1973
|
+
|
1974
|
+
|
1975
|
+
@dataclass(kw_only=True)
|
1976
|
+
class GroupData(BaseModel):
|
1977
|
+
"""Groups data."""
|
1978
|
+
|
1979
|
+
name: str
|
1980
|
+
summary: str = ""
|
1981
|
+
description: str = ""
|
1982
|
+
leader: GroupLeader
|
1983
|
+
type: GroupType
|
1984
|
+
privacy: GroupPrivacy
|
1985
|
+
chat: list[ChatMsg]
|
1986
|
+
leaderOnly: LeaderOnly
|
1987
|
+
memberCount: int = 1
|
1988
|
+
ChallengeCount: int = 0
|
1989
|
+
chatLimitCount: int | None = None
|
1990
|
+
balance: float
|
1991
|
+
logo: str | None = None
|
1992
|
+
leaderMessage: str | None = None
|
1993
|
+
quest: QuestParty
|
1994
|
+
|
1995
|
+
|
1996
|
+
@dataclass
|
1997
|
+
class HabiticaGroupsResponse(HabiticaResponse):
|
1998
|
+
"""Representation of a groups response."""
|
1999
|
+
|
2000
|
+
data: GroupData
|
2001
|
+
|
2002
|
+
|
2003
|
+
@dataclass(kw_only=True)
|
2004
|
+
class MessageData(BaseModel):
|
2005
|
+
"""Message data."""
|
2006
|
+
|
2007
|
+
message: ChatMsg
|
2008
|
+
|
2009
|
+
|
2010
|
+
@dataclass(kw_only=True)
|
2011
|
+
class HabiticaMessageResponse(HabiticaResponse):
|
2012
|
+
"""Representation of a group response."""
|
2013
|
+
|
2014
|
+
data: MessageData
|
@@ -0,0 +1,4 @@
|
|
1
|
+
# serializer version: 1
|
2
|
+
# name: test_get_group
|
3
|
+
HabiticaGroupsResponse(data=GroupData(name="test's Party", summary="test's Party", description='', leader=GroupLeader(id=UUID('c5dece22-3b0c-4e30-a6e7-34c2524224db'), auth=AuthUser(local=LocalAuth(email=None, username='test', lowerCaseUsername=None, has_password=None), timestamps=LocalTimestamps(created=None, loggedin=None, updated=None), facebook=None, google=None, apple=None), profile=ProfileUser(blurb=None, imageUrl=None, name='test')), type=<GroupType.PARTY: 'party'>, privacy=<GroupPrivacy.PRIVATE: 'private'>, chat=[ChatMsg(id=UUID('bb436446-6e91-49ea-9607-11f955105224'), flagCount=0, text='hallo', unformattedText='hallo', info=ChatMsgInfo(type=None, user=None, quest=None, items=None), timestamp=datetime.datetime(2025, 4, 17, 12, 19, 16, 769000, tzinfo=datetime.timezone.utc), likes={}, client='web', uuid=UUID('c18e1853-bded-47a9-82e2-adfdad08894d'), groupId=UUID('d27c2e74-a65a-42cc-9ac4-46966242cb1f'), user='test', username='test', userStyles=Avatar(items=ItemsAvatar(gear=GearItemsAvatar(equipped=EquippedGear(weapon=None, armor='armor_base_0', head='head_base_0', shield='shield_special_piDay', back=None, headAccessory='headAccessory_base_0', eyewear=None, body=None), costume=EquippedGear(weapon=None, armor=None, head=None, shield=None, back=None, headAccessory=None, eyewear=None, body=None)), currentMount='', currentPet=''), preferences=PreferencesAvatar(hair=HairPreferences(color='red', base=3, bangs=0, beard=0, mustache=0, flower=1), size='slim', skin='915533', shirt='pink', chair='none', costume=False, sleep=None, background='violet'), stats=StatsAvatar(buffs=BuffsStatsavatar(seafoam=False, shinySeed=False, snowball=False, spookySparkles=False), Class=<HabiticaClass.ROGUE: 'rogue'>)), sent=None, ownerId=None, uniqueMessageId=None)], leaderOnly=LeaderOnly(challenges=False, getGems=False), memberCount=2, ChallengeCount=0, chatLimitCount=None, balance=0.0, logo=None, leaderMessage=None, quest=QuestParty(progress=ProgressQuest(up=None, down=None, collect={}, collectedItems=None), RSVPNeeded=None, key='atom1', completed=None, active=False, leader=UUID('c18e1853-bded-47a9-82e2-adfdad08894d'), members={UUID('c18e1853-bded-47a9-82e2-adfdad08894d'): True, UUID('c5dece22-3b0c-4e30-a6e7-34c2524224db'): False})), success=True, notifications=[], userV=797, appVersion='5.35.3')
|
4
|
+
# ---
|
@@ -1642,6 +1642,8 @@
|
|
1642
1642
|
'orderAscending': 'ascending',
|
1643
1643
|
'quest': dict({
|
1644
1644
|
'RSVPNeeded': False,
|
1645
|
+
'members': dict({
|
1646
|
+
}),
|
1645
1647
|
'progress': dict({
|
1646
1648
|
'collect': dict({
|
1647
1649
|
}),
|
@@ -3754,6 +3756,8 @@
|
|
3754
3756
|
'orderAscending': 'ascending',
|
3755
3757
|
'quest': dict({
|
3756
3758
|
'RSVPNeeded': False,
|
3759
|
+
'members': dict({
|
3760
|
+
}),
|
3757
3761
|
'progress': dict({
|
3758
3762
|
'collect': dict({
|
3759
3763
|
}),
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# serializer version: 1
|
2
2
|
# name: test_get_user
|
3
|
-
HabiticaUserResponse(data=UserData(items=ItemsUser(gear=GearItems(equipped=EquippedGear(weapon='weapon_special_fall2024Warrior', armor='armor_special_fall2024Warrior', head='head_special_fall2024Warrior', shield='shield_special_fall2024Warrior', back='back_mystery_201402', headAccessory='headAccessory_special_pinkHeadband', eyewear='eyewear_special_pinkHalfMoon', body='body_mystery_202003'), costume=EquippedGear(weapon=None, armor='armor_base_0', head='head_base_0', shield='shield_base_0', back=None, headAccessory=None, eyewear=None, body=None), owned={'headAccessory_special_blackHeadband': True, 'headAccessory_special_blueHeadband': True, 'headAccessory_special_greenHeadband': True, 'headAccessory_special_pinkHeadband': True, 'headAccessory_special_redHeadband': True, 'headAccessory_special_whiteHeadband': True, 'headAccessory_special_yellowHeadband': True, 'eyewear_special_blackTopFrame': True, 'eyewear_special_blueTopFrame': True, 'eyewear_special_greenTopFrame': True, 'eyewear_special_pinkTopFrame': True, 'eyewear_special_redTopFrame': True, 'eyewear_special_whiteTopFrame': True, 'eyewear_special_yellowTopFrame': True, 'eyewear_special_blackHalfMoon': True, 'eyewear_special_blueHalfMoon': True, 'eyewear_special_greenHalfMoon': True, 'eyewear_special_pinkHalfMoon': True, 'eyewear_special_redHalfMoon': True, 'eyewear_special_whiteHalfMoon': True, 'eyewear_special_yellowHalfMoon': True}), currentMount='Velociraptor-Base', currentPet='Rat-Shade', special=SpecialItems(birthdayReceived=[], birthday=0, thankyouReceived=[], thankyou=0, greetingReceived=[], greeting=0, nyeReceived=[], nye=0, valentineReceived=[], valentine=0, seafoam=0, shinySeed=0, spookySparkles=0, snowball=0, congrats=0, congratsReceived=[], getwell=0, getwellReceived=[], goodluck=0, goodluckReceived=[]), lastDrop=LastDropItems(count=0, date=datetime.datetime(2024, 10, 19, 18, 43, 39, 784000, tzinfo=datetime.timezone.utc)), quests={'dustbunnies': 1}, mounts={}, food={}, hatchingPotions={}, eggs={}, pets={}), preferences=PreferencesUser(hair=HairPreferences(color='red', base=3, bangs=1, beard=0, mustache=0, flower=1), size='slim', skin='915533', shirt='blue', chair='none', costume=False, sleep=False, background='violet', emailNotifications=EmailNotificationsPreferences(unsubscribeFromAll=False, newPM=True, kickedGroup=True, wonChallenge=True, giftedGems=True, giftedSubscription=True, invitedParty=True, invitedGuild=True, questStarted=True, invitedQuest=True, importantAnnouncements=True, weeklyRecaps=True, onboarding=True, majorUpdates=True, subscriptionReminders=True, contentRelease=True), pushNotifications=PushNotificationsPreferences(unsubscribeFromAll=False, newPM=True, wonChallenge=True, giftedGems=True, giftedSubscription=True, invitedParty=True, invitedGuild=True, questStarted=True, invitedQuest=True, majorUpdates=True, mentionParty=True, mentionJoinedGuild=True, mentionUnjoinedGuild=True, partyActivity=True, contentRelease=True), suppressModals=SuppressModalsPreferences(levelUp=False, hatchPet=False, raisePet=False, streak=False), tasks=TasksPreferences(activeFilter=ActiveFilterTask(habit='all', daily='all', todo='remaining', reward='all'), groupByChallenge=False, confirmScoreNotes=False, mirrorGroupTasks=[]), dayStart=0, hideHeader=False, timezoneOffset=-120, sound='rosstavoTheme', allocationMode='flat', autoEquip=True, dateFormat='MM/dd/yyyy', stickyHeader=True, disableClasses=False, newTaskEdit=False, dailyDueDefaultView=False, advancedCollapsed=False, toolbarCollapsed=False, reverseChatOrder=False, developerMode=False, displayInviteToPartyWhenPartyIs1=True, automaticAllocation=None, webhooks={}, improvementCategories=[], timezoneOffsetAtLastCron=None, language=<Language.DE: 'de'>), stats=StatsUser(buffs=BuffsStats(seafoam=False, shinySeed=False, snowball=False, spookySparkles=False, Str=0, per=0, con=0, stealth=0, streaks=False, Int=0), Class=<HabiticaClass.WARRIOR: 'warrior'>, training=TrainingStats(Str=0.0, per=0, con=0, Int=0), hp=50.0, mp=10.0, exp=0, gp=0.0, lvl=1, points=0, Str=0, con=0, per=0, toNextLevel=25, maxHealth=50, maxMP=30, Int=0), id=UUID('c18e1853-bded-47a9-82e2-adfdad08894d'), flags=FlagsUser(customizationsNotification=False, tour=TourFlags(intro=-1, classes=-1, stats=-1, tavern=-1, party=-1, guilds=-1, challenges=-1, market=-1, pets=-1, mounts=-1, hall=-1, equipment=-1, groupPlans=-1), showTour=True, tutorial=TutorialFlags(common=CommonTutorial(habits=True, dailies=True, todos=True, rewards=True, party=True, pets=True, gems=True, skills=True, classes=True, tavern=True, equipment=True, items=True, mounts=True, inbox=True, stats=True), ios=IosTutorial(addTask=False, editTask=False, deleteTask=False, filterTask=False, groupPets=False, inviteParty=False, reorderTask=False)), dropsEnabled=False, itemsEnabled=False, lastNewStuffRead='', rewrite=True, classSelected=False, rebirthEnabled=False, levelDrops={}, recaptureEmailsPhase=0, weeklyRecapEmailsPhase=0, lastWeeklyRecap=datetime.datetime(2024, 10, 19, 18, 43, 39, 782000, tzinfo=datetime.timezone.utc), communityGuidelinesAccepted=False, cronCount=0, welcomed=True, armoireEnabled=True, armoireOpened=False, armoireEmpty=False, cardReceived=False, warnedLowHealth=False, verifiedUsername=True, newStuff=False, thirdPartyTools=None, mathUpdates=None, lastFreeRebirth=None, chatRevoked=None, chatShadowMuted=None, lastWeeklyRecapDiscriminator=None, onboardingEmailsPhase=None), auth=AuthUser(local=LocalAuth(email='test@example.com', username='test', lowerCaseUsername='test', has_password=True), timestamps=LocalTimestamps(created=datetime.datetime(2024, 10, 19, 18, 43, 39, 782000, tzinfo=datetime.timezone.utc), loggedin=datetime.datetime(2024, 10, 19, 18, 43, 39, 782000, tzinfo=datetime.timezone.utc), updated=datetime.datetime(2024, 10, 19, 18, 44, 51, 37000, tzinfo=datetime.timezone.utc)), facebook={}, google={}, apple={}), achievements=AchievementsUser(ultimateGearSets=UltimateGearSetsAchievments(healer=False, wizard=False, rogue=False, warrior=False), streak=0, challenges=[], perfect=0, quests=QuestsAchievments(bewilder=None, burnout=None, stressbeast=None, harpy=None, atom3=None, vice3=None, vice1=None, gryphon=None, evilsanta2=None, evilsanta=None, dilatory_derby=None, dilatory=None, atom2=None, atom1=None, dysheartener=None), backToBasics=None, dustDevil=None, primedForPainting=None, completedTask=None, createdTask=None, fedPet=None, hatchedPet=None, purchasedEquipment=None, tickledPink=None, goodAsGold=None, boneCollector=None, seeingRed=None, violetsAreBlue=None, shadyCustomer=None, joinedGuild=None, joinedChallenge=None, partyUp=None), backer=BackerUser(tier=None, npc=None, tokensApplied=None), contributor=ContributorUser(contributions=None, level=None, text=None), permissions=PermissionsUser(fullAccess=None, news=None, userSupport=None, challengeAdmin=None, moderator=None, coupons=None), purchased=PurchasedUser(plan=PlanPurchased(consecutive=ConsecutivePlan(trinkets=0, gemCapExtra=0, offset=0, count=0), mysteryItems=[], gemsBought=0, extraMonths=0, dateUpdated=None, perkMonthCount=-1, quantity=1), txnCount=0, background={'violet': True}, shirt={}, hair={}, skin={}, ads=False, mobileChat=None), history=HistoryUser(todos=[], exp=[]), invitations=InvitationsUser(party={}, guilds=[], parties=[]), party=PartyUser(quest=QuestParty(progress=ProgressQuest(up=0.0, down=0.0, collect={}, collectedItems=0), RSVPNeeded=False, key=None, completed=None), order='level', orderAscending='ascending', _id=None), profile=ProfileUser(blurb=None, imageUrl=None, name='test'), notifications=[], tags=[TagsUser(id=UUID('5358c71f-fe0f-4583-84a3-109b70c699fd'), name='Arbeit', challenge=None, group=None), TagsUser(id=UUID('45870b8b-3e1e-4e13-a722-6afcacdf689f'), name='Training', challenge=None, group=None), TagsUser(id=UUID('3e49b9db-0cc5-4070-b860-e16f1e4806a4'), name='Gesundheit + Wohlbefinden', challenge=None, group=None), TagsUser(id=UUID('0d85319e-7b9c-43e2-81ed-2a706521d5e3'), name='Schule', challenge=None, group=None), TagsUser(id=UUID('b7cf86bf-97ac-42d3-b5d0-5ffe998b62b4'), name='Teams', challenge=None, group=None), TagsUser(id=UUID('c584d792-0a9b-4646-a6ca-a67bb6ef3c36'), name='Hausarbeiten', challenge=None, group=None), TagsUser(id=UUID('0602fd13-edf2-46a7-99c0-c5084046efbb'), name='Kreativität', challenge=None, group=None)], inbox=InboxUser(newMessages=0, optOut=False, blocks=[], messages={}), tasksOrder=TasksOrderUser(habits=[UUID('21b10675-e238-4462-be11-1a4f8012fc9c'), UUID('69909140-a920-4b83-b018-b9156760aca3'), UUID('7e0679cf-e9cd-4604-b429-d061ea16ce72'), UUID('270df162-d47d-488b-9c1d-4fc4f0e2b2d2'), UUID('80ad00b5-622e-4d1a-af4d-6a6c199f3571'), UUID('0712669d-8374-4211-84ea-715cbcbae9c1'), UUID('56dee98d-038a-43f3-a514-59b1ed9a52ee'), UUID('25df4765-754c-47b1-a011-83b31f70c4fb')], dailys=[UUID('e22e9ef0-15be-478a-81c7-f9fdbb4fac10'), UUID('2a74baa2-3acd-426c-bce4-6b4bb145a8d5'), UUID('e18d0899-7c59-41c0-affd-318b8850c3e5'), UUID('3d0cecac-73c1-462b-ab39-a39cea107e6b'), UUID('1ed21cd0-e6f5-4707-b1b4-fb376d462387'), UUID('9117ad5e-2cda-43e0-a07c-0b175d32c0eb')], todos=[UUID('ac13c62c-9375-4809-a357-0e42b01a1b43'), UUID('2388ccad-0387-4ea6-9968-2d10d994e903'), UUID('5c6efb91-6ae3-4cad-8b19-2dd2fc52a965'), UUID('80afe0b9-e367-4473-8117-b8bc7115f54a'), UUID('4cc21c36-886c-4a43-b580-877e958a37fd'), UUID('10a45996-7133-4ca1-84d8-abf1093d9dcc'), UUID('fb867459-ae50-4cee-9017-c13206c6dfa2')], rewards=[UUID('4b18ccf6-3934-43a5-a153-31af8b2a36d9')]), extra={}, pushDevices=[], webhooks=[TaskActivityWebhook(url='https://some-webhook-url.com', enabled=True, label='My Webhook', id=UUID('43a67e37-1bae-4b11-8d3d-6c4b1b480231'), Type=<WebhookType.TASK_ACTIVITY: 'taskActivity'>, options=TaskActivityOptions(created=False, updated=False, deleted=False, checklistScored=False, scored=True), failures=0, lastFailureAt=None, createdAt=datetime.datetime(2025, 2, 8, 22, 6, 8, 894000, tzinfo=datetime.timezone.utc), updatedAt=datetime.datetime(2025, 2, 8, 22, 6, 17, 195000, tzinfo=datetime.timezone.utc)), GroupChatReceivedWebhook(url='https://some-webhook-url.com', enabled=True, label='My Chat Webhook', id=None, groupId=None, Type=<WebhookType.GROUP_CHAT_RECEIVED: 'groupChatReceived'>, options=GroupChatReceivedOptions(groupId=UUID('89ee933e-79e5-43ed-8722-3ca5a58be79f')), failures=0, lastFailureAt=None, createdAt=None, updatedAt=None), UserActivityWebhook(url='https://some-webhook-url.com', enabled=True, label='My Activity Webhook', id=None, Type=<WebhookType.USER_ACTIVITY: 'userActivity'>, options=UserActivityOptions(petHatched=False, mountRaised=False, leveledUp=False), failures=0, lastFailureAt=None, createdAt=None, updatedAt=None)], loginIncentives=0, invitesSent=0, pinnedItems=[PinnedItemsUser(path='gear.flat.weapon_warrior_0', Type='marketGear'), PinnedItemsUser(path='gear.flat.armor_warrior_1', Type='marketGear'), PinnedItemsUser(path='gear.flat.shield_warrior_1', Type='marketGear'), PinnedItemsUser(path='gear.flat.head_warrior_1', Type='marketGear'), PinnedItemsUser(path='potion', Type='potion'), PinnedItemsUser(path='armoire', Type='armoire')], pinnedItemsOrder=[], unpinnedItems=[], secret=None, balance=0.0, lastCron=datetime.datetime(2024, 10, 19, 18, 43, 39, 784000, tzinfo=datetime.timezone.utc), needsCron=False, challenges=[], guilds=[], newMessages={}), success=True, notifications=[], userV=5, appVersion='5.28.8')
|
3
|
+
HabiticaUserResponse(data=UserData(items=ItemsUser(gear=GearItems(equipped=EquippedGear(weapon='weapon_special_fall2024Warrior', armor='armor_special_fall2024Warrior', head='head_special_fall2024Warrior', shield='shield_special_fall2024Warrior', back='back_mystery_201402', headAccessory='headAccessory_special_pinkHeadband', eyewear='eyewear_special_pinkHalfMoon', body='body_mystery_202003'), costume=EquippedGear(weapon=None, armor='armor_base_0', head='head_base_0', shield='shield_base_0', back=None, headAccessory=None, eyewear=None, body=None), owned={'headAccessory_special_blackHeadband': True, 'headAccessory_special_blueHeadband': True, 'headAccessory_special_greenHeadband': True, 'headAccessory_special_pinkHeadband': True, 'headAccessory_special_redHeadband': True, 'headAccessory_special_whiteHeadband': True, 'headAccessory_special_yellowHeadband': True, 'eyewear_special_blackTopFrame': True, 'eyewear_special_blueTopFrame': True, 'eyewear_special_greenTopFrame': True, 'eyewear_special_pinkTopFrame': True, 'eyewear_special_redTopFrame': True, 'eyewear_special_whiteTopFrame': True, 'eyewear_special_yellowTopFrame': True, 'eyewear_special_blackHalfMoon': True, 'eyewear_special_blueHalfMoon': True, 'eyewear_special_greenHalfMoon': True, 'eyewear_special_pinkHalfMoon': True, 'eyewear_special_redHalfMoon': True, 'eyewear_special_whiteHalfMoon': True, 'eyewear_special_yellowHalfMoon': True}), currentMount='Velociraptor-Base', currentPet='Rat-Shade', special=SpecialItems(birthdayReceived=[], birthday=0, thankyouReceived=[], thankyou=0, greetingReceived=[], greeting=0, nyeReceived=[], nye=0, valentineReceived=[], valentine=0, seafoam=0, shinySeed=0, spookySparkles=0, snowball=0, congrats=0, congratsReceived=[], getwell=0, getwellReceived=[], goodluck=0, goodluckReceived=[]), lastDrop=LastDropItems(count=0, date=datetime.datetime(2024, 10, 19, 18, 43, 39, 784000, tzinfo=datetime.timezone.utc)), quests={'dustbunnies': 1}, mounts={}, food={}, hatchingPotions={}, eggs={}, pets={}), preferences=PreferencesUser(hair=HairPreferences(color='red', base=3, bangs=1, beard=0, mustache=0, flower=1), size='slim', skin='915533', shirt='blue', chair='none', costume=False, sleep=False, background='violet', emailNotifications=EmailNotificationsPreferences(unsubscribeFromAll=False, newPM=True, kickedGroup=True, wonChallenge=True, giftedGems=True, giftedSubscription=True, invitedParty=True, invitedGuild=True, questStarted=True, invitedQuest=True, importantAnnouncements=True, weeklyRecaps=True, onboarding=True, majorUpdates=True, subscriptionReminders=True, contentRelease=True), pushNotifications=PushNotificationsPreferences(unsubscribeFromAll=False, newPM=True, wonChallenge=True, giftedGems=True, giftedSubscription=True, invitedParty=True, invitedGuild=True, questStarted=True, invitedQuest=True, majorUpdates=True, mentionParty=True, mentionJoinedGuild=True, mentionUnjoinedGuild=True, partyActivity=True, contentRelease=True), suppressModals=SuppressModalsPreferences(levelUp=False, hatchPet=False, raisePet=False, streak=False), tasks=TasksPreferences(activeFilter=ActiveFilterTask(habit='all', daily='all', todo='remaining', reward='all'), groupByChallenge=False, confirmScoreNotes=False, mirrorGroupTasks=[]), dayStart=0, hideHeader=False, timezoneOffset=-120, sound='rosstavoTheme', allocationMode='flat', autoEquip=True, dateFormat='MM/dd/yyyy', stickyHeader=True, disableClasses=False, newTaskEdit=False, dailyDueDefaultView=False, advancedCollapsed=False, toolbarCollapsed=False, reverseChatOrder=False, developerMode=False, displayInviteToPartyWhenPartyIs1=True, automaticAllocation=None, webhooks={}, improvementCategories=[], timezoneOffsetAtLastCron=None, language=<Language.DE: 'de'>), stats=StatsUser(buffs=BuffsStats(seafoam=False, shinySeed=False, snowball=False, spookySparkles=False, Str=0, per=0, con=0, stealth=0, streaks=False, Int=0), Class=<HabiticaClass.WARRIOR: 'warrior'>, training=TrainingStats(Str=0.0, per=0, con=0, Int=0), hp=50.0, mp=10.0, exp=0, gp=0.0, lvl=1, points=0, Str=0, con=0, per=0, toNextLevel=25, maxHealth=50, maxMP=30, Int=0), id=UUID('c18e1853-bded-47a9-82e2-adfdad08894d'), flags=FlagsUser(customizationsNotification=False, tour=TourFlags(intro=-1, classes=-1, stats=-1, tavern=-1, party=-1, guilds=-1, challenges=-1, market=-1, pets=-1, mounts=-1, hall=-1, equipment=-1, groupPlans=-1), showTour=True, tutorial=TutorialFlags(common=CommonTutorial(habits=True, dailies=True, todos=True, rewards=True, party=True, pets=True, gems=True, skills=True, classes=True, tavern=True, equipment=True, items=True, mounts=True, inbox=True, stats=True), ios=IosTutorial(addTask=False, editTask=False, deleteTask=False, filterTask=False, groupPets=False, inviteParty=False, reorderTask=False)), dropsEnabled=False, itemsEnabled=False, lastNewStuffRead='', rewrite=True, classSelected=False, rebirthEnabled=False, levelDrops={}, recaptureEmailsPhase=0, weeklyRecapEmailsPhase=0, lastWeeklyRecap=datetime.datetime(2024, 10, 19, 18, 43, 39, 782000, tzinfo=datetime.timezone.utc), communityGuidelinesAccepted=False, cronCount=0, welcomed=True, armoireEnabled=True, armoireOpened=False, armoireEmpty=False, cardReceived=False, warnedLowHealth=False, verifiedUsername=True, newStuff=False, thirdPartyTools=None, mathUpdates=None, lastFreeRebirth=None, chatRevoked=None, chatShadowMuted=None, lastWeeklyRecapDiscriminator=None, onboardingEmailsPhase=None), auth=AuthUser(local=LocalAuth(email='test@example.com', username='test', lowerCaseUsername='test', has_password=True), timestamps=LocalTimestamps(created=datetime.datetime(2024, 10, 19, 18, 43, 39, 782000, tzinfo=datetime.timezone.utc), loggedin=datetime.datetime(2024, 10, 19, 18, 43, 39, 782000, tzinfo=datetime.timezone.utc), updated=datetime.datetime(2024, 10, 19, 18, 44, 51, 37000, tzinfo=datetime.timezone.utc)), facebook={}, google={}, apple={}), achievements=AchievementsUser(ultimateGearSets=UltimateGearSetsAchievments(healer=False, wizard=False, rogue=False, warrior=False), streak=0, challenges=[], perfect=0, quests=QuestsAchievments(bewilder=None, burnout=None, stressbeast=None, harpy=None, atom3=None, vice3=None, vice1=None, gryphon=None, evilsanta2=None, evilsanta=None, dilatory_derby=None, dilatory=None, atom2=None, atom1=None, dysheartener=None), backToBasics=None, dustDevil=None, primedForPainting=None, completedTask=None, createdTask=None, fedPet=None, hatchedPet=None, purchasedEquipment=None, tickledPink=None, goodAsGold=None, boneCollector=None, seeingRed=None, violetsAreBlue=None, shadyCustomer=None, joinedGuild=None, joinedChallenge=None, partyUp=None), backer=BackerUser(tier=None, npc=None, tokensApplied=None), contributor=ContributorUser(contributions=None, level=None, text=None), permissions=PermissionsUser(fullAccess=None, news=None, userSupport=None, challengeAdmin=None, moderator=None, coupons=None), purchased=PurchasedUser(plan=PlanPurchased(consecutive=ConsecutivePlan(trinkets=0, gemCapExtra=0, offset=0, count=0), mysteryItems=[], gemsBought=0, extraMonths=0, dateUpdated=None, perkMonthCount=-1, quantity=1), txnCount=0, background={'violet': True}, shirt={}, hair={}, skin={}, ads=False, mobileChat=None), history=HistoryUser(todos=[], exp=[]), invitations=InvitationsUser(party={}, guilds=[], parties=[]), party=PartyUser(quest=QuestParty(progress=ProgressQuest(up=0.0, down=0.0, collect={}, collectedItems=0), RSVPNeeded=False, key=None, completed=None, active=None, leader=None, members={}), order='level', orderAscending='ascending', _id=None), profile=ProfileUser(blurb=None, imageUrl=None, name='test'), notifications=[], tags=[TagsUser(id=UUID('5358c71f-fe0f-4583-84a3-109b70c699fd'), name='Arbeit', challenge=None, group=None), TagsUser(id=UUID('45870b8b-3e1e-4e13-a722-6afcacdf689f'), name='Training', challenge=None, group=None), TagsUser(id=UUID('3e49b9db-0cc5-4070-b860-e16f1e4806a4'), name='Gesundheit + Wohlbefinden', challenge=None, group=None), TagsUser(id=UUID('0d85319e-7b9c-43e2-81ed-2a706521d5e3'), name='Schule', challenge=None, group=None), TagsUser(id=UUID('b7cf86bf-97ac-42d3-b5d0-5ffe998b62b4'), name='Teams', challenge=None, group=None), TagsUser(id=UUID('c584d792-0a9b-4646-a6ca-a67bb6ef3c36'), name='Hausarbeiten', challenge=None, group=None), TagsUser(id=UUID('0602fd13-edf2-46a7-99c0-c5084046efbb'), name='Kreativität', challenge=None, group=None)], inbox=InboxUser(newMessages=0, optOut=False, blocks=[], messages={}), tasksOrder=TasksOrderUser(habits=[UUID('21b10675-e238-4462-be11-1a4f8012fc9c'), UUID('69909140-a920-4b83-b018-b9156760aca3'), UUID('7e0679cf-e9cd-4604-b429-d061ea16ce72'), UUID('270df162-d47d-488b-9c1d-4fc4f0e2b2d2'), UUID('80ad00b5-622e-4d1a-af4d-6a6c199f3571'), UUID('0712669d-8374-4211-84ea-715cbcbae9c1'), UUID('56dee98d-038a-43f3-a514-59b1ed9a52ee'), UUID('25df4765-754c-47b1-a011-83b31f70c4fb')], dailys=[UUID('e22e9ef0-15be-478a-81c7-f9fdbb4fac10'), UUID('2a74baa2-3acd-426c-bce4-6b4bb145a8d5'), UUID('e18d0899-7c59-41c0-affd-318b8850c3e5'), UUID('3d0cecac-73c1-462b-ab39-a39cea107e6b'), UUID('1ed21cd0-e6f5-4707-b1b4-fb376d462387'), UUID('9117ad5e-2cda-43e0-a07c-0b175d32c0eb')], todos=[UUID('ac13c62c-9375-4809-a357-0e42b01a1b43'), UUID('2388ccad-0387-4ea6-9968-2d10d994e903'), UUID('5c6efb91-6ae3-4cad-8b19-2dd2fc52a965'), UUID('80afe0b9-e367-4473-8117-b8bc7115f54a'), UUID('4cc21c36-886c-4a43-b580-877e958a37fd'), UUID('10a45996-7133-4ca1-84d8-abf1093d9dcc'), UUID('fb867459-ae50-4cee-9017-c13206c6dfa2')], rewards=[UUID('4b18ccf6-3934-43a5-a153-31af8b2a36d9')]), extra={}, pushDevices=[], webhooks=[TaskActivityWebhook(url='https://some-webhook-url.com', enabled=True, label='My Webhook', id=UUID('43a67e37-1bae-4b11-8d3d-6c4b1b480231'), Type=<WebhookType.TASK_ACTIVITY: 'taskActivity'>, options=TaskActivityOptions(created=False, updated=False, deleted=False, checklistScored=False, scored=True), failures=0, lastFailureAt=None, createdAt=datetime.datetime(2025, 2, 8, 22, 6, 8, 894000, tzinfo=datetime.timezone.utc), updatedAt=datetime.datetime(2025, 2, 8, 22, 6, 17, 195000, tzinfo=datetime.timezone.utc)), GroupChatReceivedWebhook(url='https://some-webhook-url.com', enabled=True, label='My Chat Webhook', id=None, groupId=None, Type=<WebhookType.GROUP_CHAT_RECEIVED: 'groupChatReceived'>, options=GroupChatReceivedOptions(groupId=UUID('89ee933e-79e5-43ed-8722-3ca5a58be79f')), failures=0, lastFailureAt=None, createdAt=None, updatedAt=None), UserActivityWebhook(url='https://some-webhook-url.com', enabled=True, label='My Activity Webhook', id=None, Type=<WebhookType.USER_ACTIVITY: 'userActivity'>, options=UserActivityOptions(petHatched=False, mountRaised=False, leveledUp=False), failures=0, lastFailureAt=None, createdAt=None, updatedAt=None)], loginIncentives=0, invitesSent=0, pinnedItems=[PinnedItemsUser(path='gear.flat.weapon_warrior_0', Type='marketGear'), PinnedItemsUser(path='gear.flat.armor_warrior_1', Type='marketGear'), PinnedItemsUser(path='gear.flat.shield_warrior_1', Type='marketGear'), PinnedItemsUser(path='gear.flat.head_warrior_1', Type='marketGear'), PinnedItemsUser(path='potion', Type='potion'), PinnedItemsUser(path='armoire', Type='armoire')], pinnedItemsOrder=[], unpinnedItems=[], secret=None, balance=0.0, lastCron=datetime.datetime(2024, 10, 19, 18, 43, 39, 784000, tzinfo=datetime.timezone.utc), needsCron=False, challenges=[], guilds=[], newMessages={}), success=True, notifications=[], userV=5, appVersion='5.28.8')
|
4
4
|
# ---
|
5
5
|
# name: test_get_user_anonymized
|
6
|
-
HabiticaUserAnonymizedResponse(data=UserAnonymizedData(user=UserData(items=ItemsUser(gear=GearItems(equipped=EquippedGear(weapon=None, armor=None, head=None, shield=None, back=None, headAccessory=None, eyewear=None, body=None), costume=EquippedGear(weapon=None, armor=None, head=None, shield=None, back=None, headAccessory=None, eyewear=None, body=None), owned={}), currentMount=None, currentPet=None, special=SpecialItems(birthdayReceived=[], birthday=None, thankyouReceived=[], thankyou=None, greetingReceived=[], greeting=None, nyeReceived=[], nye=None, valentineReceived=[], valentine=None, seafoam=None, shinySeed=None, spookySparkles=None, snowball=None, congrats=None, congratsReceived=[], getwell=None, getwellReceived=[], goodluck=None, goodluckReceived=[]), lastDrop=LastDropItems(count=None, date=None), quests={}, mounts={}, food={}, hatchingPotions={}, eggs={}, pets={}), preferences=PreferencesUser(hair=HairPreferences(color=None, base=None, bangs=None, beard=None, mustache=None, flower=None), size=None, skin=None, shirt=None, chair=None, costume=None, sleep=None, background=None, emailNotifications=EmailNotificationsPreferences(unsubscribeFromAll=None, newPM=None, kickedGroup=None, wonChallenge=None, giftedGems=None, giftedSubscription=None, invitedParty=None, invitedGuild=None, questStarted=None, invitedQuest=None, importantAnnouncements=None, weeklyRecaps=None, onboarding=None, majorUpdates=None, subscriptionReminders=None, contentRelease=None), pushNotifications=PushNotificationsPreferences(unsubscribeFromAll=None, newPM=None, wonChallenge=None, giftedGems=None, giftedSubscription=None, invitedParty=None, invitedGuild=None, questStarted=None, invitedQuest=None, majorUpdates=None, mentionParty=None, mentionJoinedGuild=None, mentionUnjoinedGuild=None, partyActivity=None, contentRelease=None), suppressModals=SuppressModalsPreferences(levelUp=None, hatchPet=None, raisePet=None, streak=None), tasks=TasksPreferences(activeFilter=ActiveFilterTask(habit=None, daily=None, todo=None, reward=None), groupByChallenge=None, confirmScoreNotes=None, mirrorGroupTasks=[]), dayStart=None, hideHeader=None, timezoneOffset=None, sound=None, allocationMode=None, autoEquip=None, dateFormat=None, stickyHeader=None, disableClasses=None, newTaskEdit=None, dailyDueDefaultView=None, advancedCollapsed=None, toolbarCollapsed=None, reverseChatOrder=None, developerMode=None, displayInviteToPartyWhenPartyIs1=None, automaticAllocation=None, webhooks={}, improvementCategories=[], timezoneOffsetAtLastCron=None, language=None), stats=StatsUser(buffs=BuffsStats(seafoam=None, shinySeed=None, snowball=None, spookySparkles=None, Str=None, per=None, con=None, stealth=None, streaks=None, Int=None), Class=<HabiticaClass.WARRIOR: 'warrior'>, training=TrainingStats(Str=None, per=None, con=None, Int=None), hp=None, mp=None, exp=None, gp=None, lvl=None, points=None, Str=None, con=None, per=None, toNextLevel=None, maxHealth=None, maxMP=None, Int=None), id=None, flags=FlagsUser(customizationsNotification=None, tour=TourFlags(intro=None, classes=None, stats=None, tavern=None, party=None, guilds=None, challenges=None, market=None, pets=None, mounts=None, hall=None, equipment=None, groupPlans=None), showTour=None, tutorial=TutorialFlags(common=None, ios=None), dropsEnabled=None, itemsEnabled=None, lastNewStuffRead=None, rewrite=None, classSelected=None, rebirthEnabled=None, levelDrops={}, recaptureEmailsPhase=None, weeklyRecapEmailsPhase=None, lastWeeklyRecap=None, communityGuidelinesAccepted=None, cronCount=None, welcomed=None, armoireEnabled=None, armoireOpened=None, armoireEmpty=None, cardReceived=None, warnedLowHealth=None, verifiedUsername=None, newStuff=None, thirdPartyTools=None, mathUpdates=None, lastFreeRebirth=None, chatRevoked=None, chatShadowMuted=None, lastWeeklyRecapDiscriminator=None, onboardingEmailsPhase=None), auth=AuthUser(local=LocalAuth(email=None, username=None, lowerCaseUsername=None, has_password=None), timestamps=LocalTimestamps(created=None, loggedin=None, updated=None), facebook=None, google=None, apple=None), achievements=AchievementsUser(ultimateGearSets=UltimateGearSetsAchievments(healer=None, wizard=None, rogue=None, warrior=None), streak=None, challenges=[], perfect=None, quests=QuestsAchievments(bewilder=None, burnout=None, stressbeast=None, harpy=None, atom3=None, vice3=None, vice1=None, gryphon=None, evilsanta2=None, evilsanta=None, dilatory_derby=None, dilatory=None, atom2=None, atom1=None, dysheartener=None), backToBasics=None, dustDevil=None, primedForPainting=None, completedTask=None, createdTask=None, fedPet=None, hatchedPet=None, purchasedEquipment=None, tickledPink=None, goodAsGold=None, boneCollector=None, seeingRed=None, violetsAreBlue=None, shadyCustomer=None, joinedGuild=None, joinedChallenge=None, partyUp=None), backer=BackerUser(tier=None, npc=None, tokensApplied=None), contributor=ContributorUser(contributions=None, level=None, text=None), permissions=PermissionsUser(fullAccess=None, news=None, userSupport=None, challengeAdmin=None, moderator=None, coupons=None), purchased=PurchasedUser(plan=PlanPurchased(consecutive=ConsecutivePlan(trinkets=None, gemCapExtra=None, offset=None, count=None), mysteryItems=[], gemsBought=None, extraMonths=None, dateUpdated=None, perkMonthCount=None, quantity=None), txnCount=None, background={}, shirt={}, hair={}, skin={}, ads=None, mobileChat=None), history=HistoryUser(todos=[], exp=[]), invitations=InvitationsUser(party={}, guilds=[], parties=[]), party=PartyUser(quest=QuestParty(progress=ProgressQuest(up=None, down=None, collect={}, collectedItems=None), RSVPNeeded=None, key=None, completed=None), order=None, orderAscending=None, _id=None), profile=ProfileUser(blurb=None, imageUrl=None, name=None), notifications=[], tags=[], inbox=InboxUser(newMessages=None, optOut=None, blocks=[], messages={}), tasksOrder=TasksOrderUser(habits=[], dailys=[], todos=[], rewards=[]), extra={}, pushDevices=[], webhooks=[], loginIncentives=None, invitesSent=None, pinnedItems=[], pinnedItemsOrder=[], unpinnedItems=[], secret=None, balance=None, lastCron=None, needsCron=None, challenges=[], guilds=[], newMessages={}), tasks=[]))
|
6
|
+
HabiticaUserAnonymizedResponse(data=UserAnonymizedData(user=UserData(items=ItemsUser(gear=GearItems(equipped=EquippedGear(weapon=None, armor=None, head=None, shield=None, back=None, headAccessory=None, eyewear=None, body=None), costume=EquippedGear(weapon=None, armor=None, head=None, shield=None, back=None, headAccessory=None, eyewear=None, body=None), owned={}), currentMount=None, currentPet=None, special=SpecialItems(birthdayReceived=[], birthday=None, thankyouReceived=[], thankyou=None, greetingReceived=[], greeting=None, nyeReceived=[], nye=None, valentineReceived=[], valentine=None, seafoam=None, shinySeed=None, spookySparkles=None, snowball=None, congrats=None, congratsReceived=[], getwell=None, getwellReceived=[], goodluck=None, goodluckReceived=[]), lastDrop=LastDropItems(count=None, date=None), quests={}, mounts={}, food={}, hatchingPotions={}, eggs={}, pets={}), preferences=PreferencesUser(hair=HairPreferences(color=None, base=None, bangs=None, beard=None, mustache=None, flower=None), size=None, skin=None, shirt=None, chair=None, costume=None, sleep=None, background=None, emailNotifications=EmailNotificationsPreferences(unsubscribeFromAll=None, newPM=None, kickedGroup=None, wonChallenge=None, giftedGems=None, giftedSubscription=None, invitedParty=None, invitedGuild=None, questStarted=None, invitedQuest=None, importantAnnouncements=None, weeklyRecaps=None, onboarding=None, majorUpdates=None, subscriptionReminders=None, contentRelease=None), pushNotifications=PushNotificationsPreferences(unsubscribeFromAll=None, newPM=None, wonChallenge=None, giftedGems=None, giftedSubscription=None, invitedParty=None, invitedGuild=None, questStarted=None, invitedQuest=None, majorUpdates=None, mentionParty=None, mentionJoinedGuild=None, mentionUnjoinedGuild=None, partyActivity=None, contentRelease=None), suppressModals=SuppressModalsPreferences(levelUp=None, hatchPet=None, raisePet=None, streak=None), tasks=TasksPreferences(activeFilter=ActiveFilterTask(habit=None, daily=None, todo=None, reward=None), groupByChallenge=None, confirmScoreNotes=None, mirrorGroupTasks=[]), dayStart=None, hideHeader=None, timezoneOffset=None, sound=None, allocationMode=None, autoEquip=None, dateFormat=None, stickyHeader=None, disableClasses=None, newTaskEdit=None, dailyDueDefaultView=None, advancedCollapsed=None, toolbarCollapsed=None, reverseChatOrder=None, developerMode=None, displayInviteToPartyWhenPartyIs1=None, automaticAllocation=None, webhooks={}, improvementCategories=[], timezoneOffsetAtLastCron=None, language=None), stats=StatsUser(buffs=BuffsStats(seafoam=None, shinySeed=None, snowball=None, spookySparkles=None, Str=None, per=None, con=None, stealth=None, streaks=None, Int=None), Class=<HabiticaClass.WARRIOR: 'warrior'>, training=TrainingStats(Str=None, per=None, con=None, Int=None), hp=None, mp=None, exp=None, gp=None, lvl=None, points=None, Str=None, con=None, per=None, toNextLevel=None, maxHealth=None, maxMP=None, Int=None), id=None, flags=FlagsUser(customizationsNotification=None, tour=TourFlags(intro=None, classes=None, stats=None, tavern=None, party=None, guilds=None, challenges=None, market=None, pets=None, mounts=None, hall=None, equipment=None, groupPlans=None), showTour=None, tutorial=TutorialFlags(common=None, ios=None), dropsEnabled=None, itemsEnabled=None, lastNewStuffRead=None, rewrite=None, classSelected=None, rebirthEnabled=None, levelDrops={}, recaptureEmailsPhase=None, weeklyRecapEmailsPhase=None, lastWeeklyRecap=None, communityGuidelinesAccepted=None, cronCount=None, welcomed=None, armoireEnabled=None, armoireOpened=None, armoireEmpty=None, cardReceived=None, warnedLowHealth=None, verifiedUsername=None, newStuff=None, thirdPartyTools=None, mathUpdates=None, lastFreeRebirth=None, chatRevoked=None, chatShadowMuted=None, lastWeeklyRecapDiscriminator=None, onboardingEmailsPhase=None), auth=AuthUser(local=LocalAuth(email=None, username=None, lowerCaseUsername=None, has_password=None), timestamps=LocalTimestamps(created=None, loggedin=None, updated=None), facebook=None, google=None, apple=None), achievements=AchievementsUser(ultimateGearSets=UltimateGearSetsAchievments(healer=None, wizard=None, rogue=None, warrior=None), streak=None, challenges=[], perfect=None, quests=QuestsAchievments(bewilder=None, burnout=None, stressbeast=None, harpy=None, atom3=None, vice3=None, vice1=None, gryphon=None, evilsanta2=None, evilsanta=None, dilatory_derby=None, dilatory=None, atom2=None, atom1=None, dysheartener=None), backToBasics=None, dustDevil=None, primedForPainting=None, completedTask=None, createdTask=None, fedPet=None, hatchedPet=None, purchasedEquipment=None, tickledPink=None, goodAsGold=None, boneCollector=None, seeingRed=None, violetsAreBlue=None, shadyCustomer=None, joinedGuild=None, joinedChallenge=None, partyUp=None), backer=BackerUser(tier=None, npc=None, tokensApplied=None), contributor=ContributorUser(contributions=None, level=None, text=None), permissions=PermissionsUser(fullAccess=None, news=None, userSupport=None, challengeAdmin=None, moderator=None, coupons=None), purchased=PurchasedUser(plan=PlanPurchased(consecutive=ConsecutivePlan(trinkets=None, gemCapExtra=None, offset=None, count=None), mysteryItems=[], gemsBought=None, extraMonths=None, dateUpdated=None, perkMonthCount=None, quantity=None), txnCount=None, background={}, shirt={}, hair={}, skin={}, ads=None, mobileChat=None), history=HistoryUser(todos=[], exp=[]), invitations=InvitationsUser(party={}, guilds=[], parties=[]), party=PartyUser(quest=QuestParty(progress=ProgressQuest(up=None, down=None, collect={}, collectedItems=None), RSVPNeeded=None, key=None, completed=None, active=None, leader=None, members={}), order=None, orderAscending=None, _id=None), profile=ProfileUser(blurb=None, imageUrl=None, name=None), notifications=[], tags=[], inbox=InboxUser(newMessages=None, optOut=None, blocks=[], messages={}), tasksOrder=TasksOrderUser(habits=[], dailys=[], todos=[], rewards=[]), extra={}, pushDevices=[], webhooks=[], loginIncentives=None, invitesSent=None, pinnedItems=[], pinnedItemsOrder=[], unpinnedItems=[], secret=None, balance=None, lastCron=None, needsCron=None, challenges=[], guilds=[], newMessages={}), tasks=[]))
|
7
7
|
# ---
|
@@ -121,6 +121,10 @@ def aioclient_mock() -> Generator[aioresponses]:
|
|
121
121
|
"https://habitica.com/api/v3/tasks/7bc0d924-f5e5-48a6-af7f-8075f8c94e0f/move/to/2",
|
122
122
|
body=load_fixture("task_order.json"),
|
123
123
|
)
|
124
|
+
m.get(
|
125
|
+
"https://habitica.com/api/v3/groups/party",
|
126
|
+
body=load_fixture("party.json"),
|
127
|
+
)
|
124
128
|
|
125
129
|
yield m
|
126
130
|
|
@@ -0,0 +1,132 @@
|
|
1
|
+
{
|
2
|
+
"success": true,
|
3
|
+
"data": {
|
4
|
+
"leaderOnly": {
|
5
|
+
"challenges": false,
|
6
|
+
"getGems": false
|
7
|
+
},
|
8
|
+
"quest": {
|
9
|
+
"progress": {
|
10
|
+
"collect": {}
|
11
|
+
},
|
12
|
+
"active": false,
|
13
|
+
"members": {
|
14
|
+
"c18e1853-bded-47a9-82e2-adfdad08894d": true,
|
15
|
+
"c5dece22-3b0c-4e30-a6e7-34c2524224db": null
|
16
|
+
},
|
17
|
+
"extra": {},
|
18
|
+
"key": "atom1",
|
19
|
+
"leader": "c18e1853-bded-47a9-82e2-adfdad08894d"
|
20
|
+
},
|
21
|
+
"tasksOrder": {
|
22
|
+
"habits": [],
|
23
|
+
"dailys": [],
|
24
|
+
"todos": [],
|
25
|
+
"rewards": []
|
26
|
+
},
|
27
|
+
"purchased": {
|
28
|
+
"plan": {
|
29
|
+
"consecutive": {
|
30
|
+
"count": 0,
|
31
|
+
"offset": 0,
|
32
|
+
"gemCapExtra": 0,
|
33
|
+
"trinkets": 0
|
34
|
+
},
|
35
|
+
"quantity": 1,
|
36
|
+
"extraMonths": 0,
|
37
|
+
"gemsBought": 0,
|
38
|
+
"cumulativeCount": 0,
|
39
|
+
"mysteryItems": []
|
40
|
+
}
|
41
|
+
},
|
42
|
+
"cron": {},
|
43
|
+
"_id": "d27c2e74-a65a-42cc-9ac4-46966242cb1f",
|
44
|
+
"name": "test's Party",
|
45
|
+
"type": "party",
|
46
|
+
"privacy": "private",
|
47
|
+
"chat": [
|
48
|
+
{
|
49
|
+
"_id": "bb436446-6e91-49ea-9607-11f955105224",
|
50
|
+
"flagCount": 0,
|
51
|
+
"flags": {},
|
52
|
+
"id": "bb436446-6e91-49ea-9607-11f955105224",
|
53
|
+
"text": "hallo",
|
54
|
+
"unformattedText": "hallo",
|
55
|
+
"info": {},
|
56
|
+
"timestamp": 1744892356769,
|
57
|
+
"likes": {},
|
58
|
+
"client": "web",
|
59
|
+
"uuid": "c18e1853-bded-47a9-82e2-adfdad08894d",
|
60
|
+
"contributor": {},
|
61
|
+
"backer": {},
|
62
|
+
"user": "test",
|
63
|
+
"username": "test",
|
64
|
+
"groupId": "d27c2e74-a65a-42cc-9ac4-46966242cb1f",
|
65
|
+
"userStyles": {
|
66
|
+
"items": {
|
67
|
+
"gear": {
|
68
|
+
"equipped": {
|
69
|
+
"armor": "armor_base_0",
|
70
|
+
"head": "head_base_0",
|
71
|
+
"shield": "shield_special_piDay",
|
72
|
+
"headAccessory": "headAccessory_base_0"
|
73
|
+
}
|
74
|
+
},
|
75
|
+
"currentMount": "",
|
76
|
+
"currentPet": ""
|
77
|
+
},
|
78
|
+
"preferences": {
|
79
|
+
"hair": {
|
80
|
+
"color": "red",
|
81
|
+
"base": 3,
|
82
|
+
"bangs": 0,
|
83
|
+
"beard": 0,
|
84
|
+
"mustache": 0,
|
85
|
+
"flower": 1
|
86
|
+
},
|
87
|
+
"skin": "915533",
|
88
|
+
"shirt": "pink",
|
89
|
+
"chair": "none",
|
90
|
+
"size": "slim",
|
91
|
+
"background": "violet",
|
92
|
+
"costume": false
|
93
|
+
},
|
94
|
+
"stats": {
|
95
|
+
"class": "rogue",
|
96
|
+
"buffs": {
|
97
|
+
"seafoam": false,
|
98
|
+
"shinySeed": false,
|
99
|
+
"spookySparkles": false,
|
100
|
+
"snowball": false
|
101
|
+
}
|
102
|
+
}
|
103
|
+
}
|
104
|
+
}
|
105
|
+
],
|
106
|
+
"memberCount": 2,
|
107
|
+
"challengeCount": 0,
|
108
|
+
"balance": 0,
|
109
|
+
"managers": {},
|
110
|
+
"categories": [],
|
111
|
+
"leader": {
|
112
|
+
"auth": {
|
113
|
+
"local": {
|
114
|
+
"username": "test"
|
115
|
+
}
|
116
|
+
},
|
117
|
+
"flags": {
|
118
|
+
"verifiedUsername": true
|
119
|
+
},
|
120
|
+
"profile": {
|
121
|
+
"name": "test"
|
122
|
+
},
|
123
|
+
"_id": "c5dece22-3b0c-4e30-a6e7-34c2524224db",
|
124
|
+
"id": "c5dece22-3b0c-4e30-a6e7-34c2524224db"
|
125
|
+
},
|
126
|
+
"summary": "test's Party",
|
127
|
+
"id": "d27c2e74-a65a-42cc-9ac4-46966242cb1f"
|
128
|
+
},
|
129
|
+
"notifications": [],
|
130
|
+
"userV": 797,
|
131
|
+
"appVersion": "5.35.3"
|
132
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"""Tests group methods of Habiticalib."""
|
2
|
+
|
3
|
+
from aiohttp import ClientSession
|
4
|
+
from syrupy.assertion import SnapshotAssertion
|
5
|
+
|
6
|
+
from habiticalib import Habitica
|
7
|
+
from tests.conftest import TEST_API_KEY, TEST_API_USER
|
8
|
+
|
9
|
+
|
10
|
+
async def test_get_group(snapshot: SnapshotAssertion) -> None:
|
11
|
+
"""Test get_group method."""
|
12
|
+
|
13
|
+
async with ClientSession() as session:
|
14
|
+
habitica = Habitica(session, TEST_API_USER, TEST_API_KEY)
|
15
|
+
response = await habitica.get_group()
|
16
|
+
assert response == snapshot
|
@@ -1,99 +0,0 @@
|
|
1
|
-
name-template: 'v$RESOLVED_VERSION'
|
2
|
-
tag-template: 'v$RESOLVED_VERSION'
|
3
|
-
|
4
|
-
|
5
|
-
categories:
|
6
|
-
- title: '⚠️ Breaking changes'
|
7
|
-
labels:
|
8
|
-
- 'breaking'
|
9
|
-
- title: '🚀 Features'
|
10
|
-
labels:
|
11
|
-
- 'feature'
|
12
|
-
- 'enhancement'
|
13
|
-
- title: '🐛 Bug Fixes'
|
14
|
-
labels:
|
15
|
-
- 'bug'
|
16
|
-
- title: '⏳ Deprecations'
|
17
|
-
labels:
|
18
|
-
- 'deprecation'
|
19
|
-
- title: '📃 Documentation'
|
20
|
-
labels:
|
21
|
-
- 'documentation'
|
22
|
-
collapse-after: 5
|
23
|
-
- title: '🧰 Maintenance'
|
24
|
-
labels:
|
25
|
-
- 'ci'
|
26
|
-
- 'build'
|
27
|
-
- title: '🔬 Other improvements'
|
28
|
-
labels:
|
29
|
-
- 'style'
|
30
|
-
- 'testing'
|
31
|
-
- 'perfomance'
|
32
|
-
- 'code quality'
|
33
|
-
- title: '🧩 Dependency Updates'
|
34
|
-
labels:
|
35
|
-
- 'dependencies'
|
36
|
-
- 'github_actions'
|
37
|
-
|
38
|
-
autolabeler:
|
39
|
-
- label: 'feature'
|
40
|
-
title:
|
41
|
-
- '/adds/i'
|
42
|
-
- '/add method/i'
|
43
|
-
- label: 'bug'
|
44
|
-
title:
|
45
|
-
- '/fix/i'
|
46
|
-
- label: 'code quality'
|
47
|
-
title:
|
48
|
-
- '/Refactor/i'
|
49
|
-
- label: 'testing'
|
50
|
-
title:
|
51
|
-
- '/test:/i'
|
52
|
-
- '/add test/i'
|
53
|
-
files:
|
54
|
-
- 'test_*'
|
55
|
-
- 'conftest.py'
|
56
|
-
- label: 'documentation'
|
57
|
-
title:
|
58
|
-
- '/docs:/i'
|
59
|
-
files:
|
60
|
-
- '*.md'
|
61
|
-
- 'mkdocs.yml'
|
62
|
-
- label: 'ci'
|
63
|
-
title:
|
64
|
-
- '/ci:/i'
|
65
|
-
files:
|
66
|
-
- '.github/*'
|
67
|
-
- label: 'dependencies'
|
68
|
-
title:
|
69
|
-
- '/bump/i'
|
70
|
-
- label: 'deprecation'
|
71
|
-
title:
|
72
|
-
- '/Deprecate/i'
|
73
|
-
|
74
|
-
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
75
|
-
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
|
76
|
-
exclude-contributors:
|
77
|
-
- 'tr4nt0r'
|
78
|
-
|
79
|
-
version-resolver:
|
80
|
-
major:
|
81
|
-
labels:
|
82
|
-
- 'major'
|
83
|
-
- 'breaking'
|
84
|
-
minor:
|
85
|
-
labels:
|
86
|
-
- 'minor'
|
87
|
-
- 'feature'
|
88
|
-
patch:
|
89
|
-
labels:
|
90
|
-
- 'patch'
|
91
|
-
- 'bug'
|
92
|
-
default: patch
|
93
|
-
|
94
|
-
template: |
|
95
|
-
## Changes
|
96
|
-
|
97
|
-
$CHANGES
|
98
|
-
|
99
|
-
Special thanks to: $CONTRIBUTORS
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/user_styles_animated_background.json
RENAMED
File without changes
|
File without changes
|
{habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/user_styles_kickstarter_pets.json
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/user_styles_spookySparkles.json
RENAMED
File without changes
|
{habiticalib-0.4.0rc0 → habiticalib-0.4.0rc1}/tests/fixtures/user_styles_weapon_critical.json
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|