ws.client.user module¶
- class ws.client.user.User(api)¶
Bases:
ws.client.meta.MetaThe
Userclass holds and interacts with information about the current user.Valid properties are listed in the
propertiesattribute. See the MediaWiki documentation for explanation of the properties.All
propertiesare evaluated lazily and cached. All cached properties are automatically invalidated aftertimeoutseconds, exceptvolatile_properties, which are invalidated aftervolatile_timeoutseconds.- module = 'userinfo'¶
- properties = {'acceptlang', 'blockinfo', 'centralids', 'changeablegroups', 'editcount', 'email', 'groupmemberships', 'groups', 'hasmsg', 'id', 'implicitgroups', 'name', 'options', 'ratelimits', 'realname', 'registrationdate', 'rights', 'unreadcount'}¶
- volatile_properties = {'editcount', 'hasmsg', 'unreadcount'}¶
- timeout = 3600¶
- volatile_timeout = 300¶
- property is_loggedin¶
Indicates whether the current session is authenticated (
True) or not (False).The property is evaluated lazily and cached with the
@LazyPropertydecorator.
- set_option(option, value)¶
Change preferences of the current user.
See the list of available options on MediaWiki.