Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: impectR
Title: Access Data from the 'Impect' API
Version: 2.5.2
Version: 2.5.3
Authors@R: c(
person("Impect", "GmbH", , "info.impect@impect.com", role = c("cph")),
person("Florian", "Schmitt", , "florian.schmitt@impect.com", role = c("aut", "cre")),
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# impectR 2.5.3

## Minor Changes
* fix bug in the `getPlayerIterationAverages()` function that occurred if a squad has no computed matches within the iteration.

# impectR 2.5.2

## Minor Changes
Expand Down
42 changes: 25 additions & 17 deletions R/getPlayerIterationAverages.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,24 +63,32 @@ getPlayerIterationAverages <- function (
averages_raw <-
purrr::map_df(
squadIds,
~ jsonlite::fromJSON(
httr::content(
.callAPIlimited(
host,
base_url = paste0(
"/v5/customerapi/iterations/",
iteration,
"/squads/",
.,
"/player-kpis"
~ {
temp <-jsonlite::fromJSON(
httr::content(
.callAPIlimited(
host,
base_url = paste0(
"/v5/customerapi/iterations/",
iteration,
"/squads/",
.,
"/player-kpis"
),
token = token
),
token = token
),
"text",
encoding = "UTF-8"
)
)$data %>%
dplyr::mutate(squadId = ..1, iterationId = iteration)
"text",
encoding = "UTF-8"
)
)$data

if (base::length(temp) > 0) {
temp <- temp %>%
dplyr::mutate(squadId = ..1, iterationId = iteration)
} else {
temp <- dplyr::tibble()
}
}
)

# get player master data from API
Expand Down
6 changes: 3 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ knitr::opts_chunk$set(

A package provided by: Impect GmbH

Version: v2.5.2
Version: v2.5.3

**Updated: October 17th 2025**
**Updated: December 17th 2025**

---

Expand Down Expand Up @@ -56,7 +56,7 @@ You can also install it from [GitHub](https://github.com/) with:

```r
# install.packages("devtools")
devtools::install_github("ImpectAPI/impectR@v2.5.2")
devtools::install_github("ImpectAPI/impectR@v2.5.3")
```

## Usage
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

A package provided by: Impect GmbH

Version: v2.5.2
Version: v2.5.3

**Updated: October 17th 2025**
**Updated: December 17th 2025**

------------------------------------------------------------------------

Expand Down Expand Up @@ -44,7 +44,7 @@ You can also install it from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("ImpectAPI/impectR@v2.5.2")
devtools::install_github("ImpectAPI/impectR@v2.5.3")
```

## Usage
Expand Down