Skip to content

Commit

Permalink
docs: Document valid participant attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Dec 5, 2023
1 parent e92d916 commit a623448
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ services:
POSTGRES_PASSWORD: secret
volumes:
- "limedb:/var/lib/postgresql/data"
ports:
- 5432:5432
healthcheck:
test: ["CMD", "pg_isready", "-U", "limesurvey"]
interval: 30s
Expand Down
2 changes: 1 addition & 1 deletion src/citric/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,7 @@ def list_participants(
start: int = 0,
limit: int = 10,
unused: bool = False,
attributes: t.Sequence[str] | bool = False,
attributes: t.Sequence[types.ParticipantAttribute | str] | bool = False,
conditions: t.Mapping[str, t.Any] | None = None,
) -> list[dict[str, t.Any]]:
"""Get participants in a survey.
Expand Down
20 changes: 20 additions & 0 deletions src/citric/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,3 +516,23 @@ class SurveyUserActivationSettings(t.TypedDict, total=False):
ipanonymize: bool
refurl: bool
savetimings: bool


ParticipantAttribute = t.Literal[
"tid",
"partcipant_id",
"firstname",
"lastname",
"email",
"emailstatus",
"token",
"language",
"blacklisted",
"sent",
"remindersent",
"remindercount",
"completed",
"usesleft",
"validfrom",
"validuntil",
]

0 comments on commit a623448

Please sign in to comment.