Skip to content

Instantly share code, notes, and snippets.

@diskszk
diskszk / fetchPokemonIdByInputName.ts
Last active November 14, 2024 12:33
PokeAPI(GraphQL)から与えられたポケモン名でポケモンのIDを取得するコード(各国語対応)
const apiEndpoint = "https://beta.pokeapi.co/graphql/v1beta";
type ReturnType = {
pokemon_v2_pokemonspeciesname": [
{
"pokemon_species_id": number
},
]
};