use of com.faforever.api.clan.result.ClanResult in project faf-java-api by FAForever.
the class ClansController method me.
@ApiOperation("Grab data about yourself and the clan")
@ApiResponses(value = { @ApiResponse(code = 200, message = "Success with JSON { player: {id: ?, login: ?}, clan: { id: ?, name: ?, tag: ?}}"), @ApiResponse(code = 400, message = "Bad Request") })
@RequestMapping(path = "/me", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
public MeResult me(Authentication authentication) {
Player player = playerService.getPlayer(authentication);
Clan clan = player.getClan();
ClanResult clanResult = null;
if (clan != null) {
clanResult = ClanResult.of(clan);
}
return new MeResult(PlayerResult.of(player), clanResult);
}
Aggregations