Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions redcap/methods/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,9 @@ def _validate_url_and_token(url: str, token: str) -> None:
actual_token_len = len(token)
expected_token_len = 32

assert actual_token_len == expected_token_len, (
f"Incorrect token format '{ token }', token must must be",
f"{ expected_token_len } characters long",
)
assert (
actual_token_len == expected_token_len
), f"Incorrect token format token must must be { expected_token_len } characters long"

@staticmethod
def _validate_request_kwargs(**request_kwargs):
Expand Down
13 changes: 10 additions & 3 deletions redcap/methods/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,16 @@ def export_users(

Examples:
>>> proj.export_users()
[{'username': ..., 'email': ..., 'expiration': '', 'data_access_group': '',
'data_access_group_id': '', 'design': 1, 'alerts': 1, 'user_rights': 1,
'data_access_groups': 1, 'reports': 1, ...}]
[{'username': '...', 'email': '...', 'firstname': '...', 'lastname': '...',
'expiration': '', 'data_access_group': '', 'data_access_group_id': '',
'data_access_group_label': '', 'design': 1, 'alerts': 1, 'user_rights': 1,
'data_access_groups': 1, 'reports': 1, 'stats_and_charts': 1,
'manage_survey_participants': 1, 'calendar': 1, 'data_import_tool': 1,
'data_comparison_tool': 1, 'logging': 1, 'email_logging': 0, 'file_repository': 1,
'data_quality_create': 1, 'data_quality_execute': 1, 'api_export': 1, 'api_import': 1,
'api_modules': 1, 'mobile_app': 1, 'mobile_app_download_data': 0, 'record_create': 1,
'record_rename': 1, 'record_delete': 1, 'lock_records_all_forms': 1, 'lock_records': 1,
'lock_records_customization': 0, 'forms': {'form_1': 1}, 'forms_export': {'form_1': 1}}]
"""
payload = self._initialize_payload(content="user", format_type=format_type)
return_type = self._lookup_return_type(format_type, request_type="export")
Expand Down
Loading