def GetUsers(self, request, context): for user in request.user: user = users_messages.User( username=user.username, user_id=user.user_id ) yield users_messages.GetUsersResult(user=user) #get each user and wrap in its according message(type) GetUsersResult
def GetUsers(self, request, context): for user in request.user: user = users_messages.User(username=user.username, user_id=user.user_id) yield users_messages.GetUsersResult(user=user)