Id Mapping operations

Get the configuration for all platform interactions

Id Mapping operations are responsible for communicating with Id Mapping API.

The namespace is of course called idMapping. All methods return promises. The general design of the namespace follows this pattern unless stated otherwise:

📘

General call:

sdk.idMapping
  .someMethod()
  .then((response) => {
    // Handle response
  })
  .catch((error) => {
    // Handle error
  });

The responses are comprised of different objects you can find here.

Football operations

Get mapped football country IDs

Method: getMappedFootballCountryIds(ids, inputProvider, outputProvider)

This method returns the ids remapped from input provider ito ouput provider.

All parameters are required

  • ids: string[] . List of IDs who match the inputProvider
  • inputProvider: "native" | "enetpulse" | "sportal365" | "sportradar" | "api_football" . The sports providers that Fans United support
  • inputProvider: "native" | "enetpulse" | "sportal365" | "sportradar" | "api_football" . The sports providers that Fans United support

N.B When the input ID is not found (or is invalid), the ouput in data will be an empty string ("")

📘

Example call:

sdk.idMapping
  .getMappedFootballCountryIds(["fb:cnt:1002"], "native", "sportal365")
  .then((response) => {
    // Handle response
  })
  .catch((error) => {
    // Handle error
  });

Example result:

{
  meta: {
    input: "native",
    output: "sportal365"
  },
  data: [
    {
      input: "fb:cnt:1002",
      output: "102"
    }
   ]
}

Get mapped football competition IDs

Method: getMappedFootballCompetitionIds(ids, inputProvider, outputProvider)

This method returns the ids remapped from input provider ito ouput provider.

All parameters are required

  • ids: string[] . List of IDs who match the inputProvider
  • inputProvider: "native" | "enetpulse" | "sportal365" | "sportradar" | "api_football" . The sports providers that Fans United support
  • inputProvider: "native" | "enetpulse" | "sportal365" | "sportradar" | "api_football" . The sports providers that Fans United support

N.B When the input ID is not found (or is invalid), the ouput in data will be an empty string ("")

📘

Example call:

sdk.idMapping
  .getMappedFootballCompetitionIds(["fb:c:3"], "native", "sportal365")
  .then((response) => {
    // Handle response
  })
  .catch((error) => {
    // Handle error
  });

Example result:

{
  meta: {
    input: "native",
    output: "sportal365"
  },
  data: [
    {
      input: "fb:c:3",
      output: "3"
    }
   ]
}

Get mapped football team IDs

Method: getMappedFootballTeamIds(ids, inputProvider, outputProvider)

This method returns the ids remapped from input provider ito ouput provider.

All parameters are required

  • ids: string[] . List of IDs who match the inputProvider
  • inputProvider: "native" | "enetpulse" | "sportal365" | "sportradar" | "api_football" . The sports providers that Fans United support
  • inputProvider: "native" | "enetpulse" | "sportal365" | "sportradar" | "api_football" . The sports providers that Fans United support

N.B When the input ID is not found (or is invalid), the ouput in data will be an empty string ("")

📘

Example call:

sdk.idMapping
  .getMappedFootballTeamIds(["fb:t:889"], "native", "sportal365")
  .then((response) => {
    // Handle response
  })
  .catch((error) => {
    // Handle error
  });

Example result:

{
  meta: {
    input: "native",
    output: "sportal365"
  },
  data: [
    {
      input: "fb:c:889",
      output: "89"
    }
   ]
}

Get mapped football player IDs

Method: getMappedFootballPlayerIds(ids, inputProvider, outputProvider)

This method returns the ids remapped from input provider ito ouput provider.

All parameters are required

  • ids: string[] . List of IDs who match the inputProvider
  • inputProvider: "native" | "enetpulse" | "sportal365" | "sportradar" | "api_football" . The sports providers that Fans United support
  • inputProvider: "native" | "enetpulse" | "sportal365" | "sportradar" | "api_football" . The sports providers that Fans United support

N.B When the input ID is not found (or is invalid), the ouput in data will be an empty string ("")

📘

Example call:

sdk.idMapping
  .getMappedFootballPlayerIds(["fb:p:43904"], "native", "sportal365")
  .then((response) => {
    // Handle response
  })
  .catch((error) => {
    // Handle error
  });

Example result:

{
  meta: {
    input: "native",
    output: "sportal365"
  },
  data: [
    {
      input: "fb:p:43904",
      output: "3904"
    }
   ]
}

Get mapped football match IDs

Method: getMappedFootballMatchIds(ids, inputProvider, outputProvider)

This method returns the ids remapped from input provider ito ouput provider.

All parameters are required

  • ids: string[] . List of IDs who match the inputProvider
  • inputProvider: "native" | "enetpulse" | "sportal365" | "sportradar" | "api_football" . The sports providers that Fans United support
  • inputProvider: "native" | "enetpulse" | "sportal365" | "sportradar" | "api_football" . The sports providers that Fans United support

N.B When the input ID is not found (or is invalid), the ouput in data will be an empty string ("")

📘

Example call:

sdk.idMapping
  .getMappedFootballMatchIds(["fb:m:320180"], "native", "sportal365")
  .then((response) => {
    // Handle response
  })
  .catch((error) => {
    // Handle error
  });

Example result:

{
  meta: {
    input: "native",
    output: "sportal365"
  },
  data: [
    {
      input: "fb:m:320180",
      output: "4427104"
    }
   ]
}