def get_preview_messages(team_id): logger.info( f"Attempting to get all preview messages for user from team #{team_id}." ) req = ClientRequest(request) messages = MessageService.get_preview_messages( req.team_authentication_data(team_id)) return jsonify(messages.json()), messages.status_code()
def get_team_bots(team_id): logger.info(f"Attempting to get team #{team_id}'s bots.") req = ClientRequest(request) response = BotService.team_bots(req.team_authentication_data(team_id)) return jsonify(response.json()), response.status_code()
def team_channels(team_id): logger.info(f"Attempting to get all channels from team #{team_id}.") req = ClientRequest(request) channels = TeamService.team_channels(req.team_authentication_data(team_id)) return jsonify(channels.json()), channels.status_code()
def team_users(team_id): logger.info(f"Attempting to get all users from team #{team_id}.") req = ClientRequest(request) users = TeamService.team_users(req.team_authentication_data(team_id)) return jsonify(users.json()), users.status_code()
def forbidden_words(team_id): logger.info(f"Attempting to get forbidden words from team {team_id}.") req = ClientRequest(request) words = TeamService.forbidden_words(req.team_authentication_data(team_id)) return jsonify(words.json()), words.status_code()
def delete_team(team_id): logger.info(f"Attempting to delete team #{team_id}.") req = ClientRequest(request) response = TeamService.delete_team(req.team_authentication_data(team_id)) return jsonify(response.json()), response.status_code()
def test_team_authentication_data_with_authentication_header_works_properly( self): input_request = Request(headers=authentication_headers) client_request = ClientRequest(input_request) self.assertIsInstance(client_request.team_authentication_data(mock), TeamAuthenticationDTO)