use of POGOProtos.Networking.Requests.Messages.MarkTutorialCompleteMessageOuterClass.MarkTutorialCompleteMessage in project PokeGOAPI-Java by Grover-c13.
the class PlayerProfile method markTutorial.
private void markTutorial(TutorialStateOuterClass.TutorialState state) throws RequestFailedException {
final MarkTutorialCompleteMessage tutorialMessage = MarkTutorialCompleteMessage.newBuilder().addTutorialsCompleted(state).setSendMarketingEmails(false).setSendPushNotifications(false).build();
ServerRequest request = new ServerRequest(RequestType.MARK_TUTORIAL_COMPLETE, tutorialMessage);
api.getRequestHandler().sendServerRequests(request);
try {
playerData = MarkTutorialCompleteResponse.parseFrom(request.getData()).getPlayerData();
updateProfile(playerData);
} catch (InvalidProtocolBufferException e) {
throw new RequestFailedException(e);
}
}
Aggregations