codingame_tools.client.service.services.user¶
user
¶
Async User service endpoint.
CgUserServiceHelper
¶
CgUserServiceHelper(service)
Bases: CgServiceHelper['CgUserService']
Helper methods for CgUserService. Currently empty.
Source code in codingame_tools/client/service/cg_service.py
124 125 | |
CgUserService
¶
CgUserService(client)
Bases: CgService
Async User service endpoint.
Source code in codingame_tools/client/service/services/user.py
24 25 26 | |
update_user_properties
async
¶
update_user_properties(properties, codingamer_id=None)
Update a subset of a codingamer's account properties.
Only fields explicitly set on properties (i.e. not left as None) are sent to the
server and updated--all other properties are left unchanged. The server returns an
empty string on success, which is discarded.
Only one property (contributions_list_last_visit) is known and modeled on
CgUserProperties so far; this will need to grow incrementally as more properties
are discovered.
Parameters:
-
properties(CgUserProperties) –The properties to update; unset (None) fields are left unchanged.
-
codingamer_id(int | None, default:None) –The codingamer to update. If not provided, defaults to the logged-in codingamer's ID.
Raises:
-
CgAuthenticationError–If the session is not authenticated and cannot implicitly login, or if
codingamer_idis not provided and no codingamer ID can be resolved from the session's credentials. -
CgClientHttpError–If a transport error occurs, or if the status code is not 2xx.
Source code in codingame_tools/client/service/services/user.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | |