use of POGOProtos.Networking.Requests.Messages.CheckAwardedBadgesMessageOuterClass.CheckAwardedBadgesMessage in project PokeGOAPI-Java by Grover-c13.
the class PlayerProfile method checkAndEquipBadges.
/**
* Check and equip badges.
*
* @throws RequestFailedException if an exception occurred while sending requests
* @deprecated use getMedals, which uses common requests to check for badges
*/
@Deprecated
public void checkAndEquipBadges() throws RequestFailedException {
CheckAwardedBadgesMessage msg = CheckAwardedBadgesMessage.newBuilder().build();
ServerRequest serverRequest = new ServerRequest(RequestType.CHECK_AWARDED_BADGES, msg);
api.requestHandler.sendServerRequests(serverRequest, false);
CheckAwardedBadgesResponse response;
try {
response = CheckAwardedBadgesResponse.parseFrom(serverRequest.getData());
} catch (InvalidProtocolBufferException e) {
throw new RequestFailedException(e);
}
this.updateAwardedMedals(response);
}
Aggregations