getEntities

getEntities does most of the heavy lifting for our higher-level API.

⚠️ NOTE ⚠️ You should probably be using getHeldItems, getPokemon, or getSkills instead.

import { getEntities } from '@pokebag/data-sdk'

async function logAllOfThePokemon(pokemon) {
  const entities = await getEntities({
    ids: pokemon,
    type: 'pokemon',
  })

  console.log(entities)
}

logAllOfThePokemon(['crustle', 'mr-mime'])
// Logs an array with data for Crustle and Mr. Mime

Last updated