diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2016-06-16 23:32:24 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2016-06-16 23:32:24 +0300 |
commit | eb930123454771b80465505579d723c92b3dd84c (patch) | |
tree | 9aeded9c85edc2ae9c00ae904d252558731d93f7 /vk/utils/tracking/status_tracker.py | |
parent | make "last seen" timestamps timezone-aware (diff) | |
download | vk-scripts-eb930123454771b80465505579d723c92b3dd84c.tar.gz vk-scripts-eb930123454771b80465505579d723c92b3dd84c.zip |
refactoring & support more user fields
And a bunch of other minor improvements.
Diffstat (limited to '')
-rw-r--r-- | vk/utils/tracking/status_tracker.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vk/utils/tracking/status_tracker.py b/vk/utils/tracking/status_tracker.py index dad14c0..f208884 100644 --- a/vk/utils/tracking/status_tracker.py +++ b/vk/utils/tracking/status_tracker.py @@ -6,7 +6,7 @@ from collections import Callable import time import vk.error -from vk.user import Field +from vk.user import UserField class StatusTracker: DEFAULT_TIMEOUT = 5 @@ -38,7 +38,7 @@ class StatusTracker: if not isinstance(fn, Callable): raise TypeError() - _USER_FIELDS = Field.SCREEN_NAME, Field.ONLINE, Field.LAST_SEEN + _USER_FIELDS = UserField.SCREEN_NAME, UserField.ONLINE, UserField.LAST_SEEN def _query_status(self, uids): return {user.get_uid(): user for user in self._api.users_get(uids, self._USER_FIELDS)} |