Exemplo n.º 1
0
 def get_users(self, page=1):
     """
     Return all TVB users
     """
     response = self.user_api.get_users(page)
     user_list, pages_no = response
     return [UserDto(**user)
             for user in response[user_list]], response[pages_no]
Exemplo n.º 2
0
 def get(self):
     """
     :return: a list of TVB users
     """
     user_list, pages_no = UserService.retrieve_all_users(
         get_current_user().username)
     return {
         "users": [UserDto(user) for user in user_list],
         "pages_no": pages_no
     }
Exemplo n.º 3
0
 def get_users(except_username, page_no, page_size):
     user_list, pages_no = UserService.retrieve_users_except(
         [except_username], page_no, page_size)
     return [UserDto(user) for user in user_list], pages_no
Exemplo n.º 4
0
 def get(self):
     """
     :return a list of system's users
     """
     users = UserService.fetch_all_users(page_size=USERS_PAGE_SIZE)
     return [UserDto(user) for user in users]