All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pro.lukasgorny.services.DataAppendService Maven / Gradle / Ivy

Go to download

Simple API wrapper written in Java for retriving statistics from http://pubgtracker.com API. This is Android version without Java 8 features to provide full compatibility with Android.

There is a newer version: 1.0.5
Show newest version
package pro.lukasgorny.services;

import pro.lukasgorny.dto.Match;
import pro.lukasgorny.dto.Player;
import pro.lukasgorny.dto.Stat;
import pro.lukasgorny.enums.PUBGSeason;

/**
 * Created by Łukasz "Husar" Górny on 2017-07-24.
 */
public class DataAppendService {

    private MatchValidationService matchValidationService;

    public DataAppendService() {
        this.matchValidationService = new MatchValidationService();
    }

    public Player appendSeasonToStats(Player player) {
        matchValidationService.validate(player.getMatches());

        for (Match match : player.getMatches()) {
            for (Stat stat : match.getStats()) {
                stat.setSeason(PUBGSeason.findByKey(match.getSeason()));
            }
        }

        return player;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy