Skip to content

Add DFL ID provider ID mapping to functions exposing external IDs #107

Description

@Flosch1006

Type of Addition

Multiple new fields within an endpoint

Endpoint Name/Path

All functions that expose external provider IDs: getMatches(), getSquadMatchsums(), getPlayerMatchsums(), getSquadRatings(), getSquadIterationAverages(), getPlayerIterationAverages(), getSquadIterationScores(), getPlayerIterationScores(), getSquadMatchScores(), getPlayerMatchScores(), getPlayerProfileScores(), getSquadCoefficients(), getFormations()

Field Details

The Impect API recently added a new ID-mapping provider, DFL ID, to the idMappings object (alongside the existing skillCorner, heimSpiel, wyscout, opta, statsPerform, transfermarkt, soccerdonna providers). It should be exposed everywhere external IDs are currently surfaced.

  • Field name: dfl -> output column dflId
    • Type: string
    • Description: DFL DataLibrary identifier for the entity
    • Example value: DFL-OBJ-002G3F (player), DFL-CLU-000010 (club)
  • In getMatches() additionally exposed as homeSquadDflId and awaySquadDflId

API Documentation Reference

https://glossary.impect.com/api-design

Example API Response

{
  "idMappings": {
    "skillCorner": ["..."],
    "wyscout": ["..."],
    "soccerdonna": ["..."],
    "dfl": ["DFL-OBJ-002G3F"]
  }
}

Proposed Implementation

Mirror the pattern used to add the previous providers (commit 2009777):

  1. In .cleanData() (R/utils.R): add "dfl" to the provider loop and dflId = as.character(.data$dfl) to the dplyr::mutate() block.
  2. Thread the new dflId column through the dplyr::select() calls and column-order vectors of every get* function (and homeSquadDflId / awaySquadDflId in getMatches()).

Additional Context

DFL IDs are alphanumeric strings, so the column is cast with as.character() (unlike the purely numeric providers cast with as.integer()).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions