Skip to content

Stats V2

Roberto Graham edited this page Feb 15, 2019 · 2 revisions

Acquiring an instance of FilterableStatisticV2

Using findAllByAccountId

final var filterableStatisticV2 = fortnite.statistic()
    .findAllByAccountId(
        fortnite.account()
            .findOneByDisplayName("Ninja")
            .map(Account::accountId)
            .orElseThrow(),
        LocalDateTime.MIN.atZone(ZoneOffset.UTC),
        ZonedDateTime.now(ZoneOffset.UTC)
    )
    .orElseThrow();

Using findAllByAccount

final var filterableStatisticV2 = fortnite.statistic()
    .findAllByAccount(
        fortnite.account()
            .findOneByDisplayName("Ninja")
            .orElseThrow(),
        LocalDateTime.MIN.atZone(ZoneOffset.UTC),
        ZonedDateTime.now(ZoneOffset.UTC)
    )
    .orElseThrow();

Using findAllBySessionAccountId

final var filterableStatisticV2 = fortnite.statistic()
    .findAllBySessionAccountId(
        LocalDateTime.MIN.atZone(ZoneOffset.UTC),
        ZonedDateTime.now(ZoneOffset.UTC)
    )
    .orElseThrow();

Filtering an instance of FilterableStatisticV2

Total players outlived on all default modes for gamepad input and keyboard and mouse input

filterableStatisticV2.byInputTypes(InputType.GAMEPAD, InputType.KEYBOARD_AND_MOUSE)
    .byModes("defaultsolo", "defaultduo", "defaultsquad")
    .playersOutlived();

Total players outlived

filterableStatisticV2.playersOutlived();