Skip to content
Closed
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ plugins/WorldCup2026/* @TimWheeler-SQUP
plugins/Notion/* @clarkd
plugins/Algolia/* @andrewmumblebee
plugins/Vercel/* @andrewmumblebee
plugins/PokeAPI/* @clarkd


11 changes: 11 additions & 0 deletions plugins/PokeAPI/v1/configValidation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"steps": [
{
"displayName": "Connect to PokéAPI",
"dataStream": { "name": "types" },
"required": true,
"error": "Could not reach PokéAPI (https://pokeapi.co). Check your network connection or agent egress.",
"success": "Connected to PokéAPI successfully."
}
]
}
24 changes: 24 additions & 0 deletions plugins/PokeAPI/v1/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"words": [
"Arceus",
"Charizard",
"clarkd",
"colour",
"Eevee",
"Farfetchd",
"Gigantamax",
"Heartgold",
"learnset",
"learnsets",
"localised",
"matchups",
"pokeapi",
"pokedex",
"Poké",
"Pokédex",
"Ponyta",
"Soulsilver",
"Tera",
"visualisation"
]
}
23 changes: 23 additions & 0 deletions plugins/PokeAPI/v1/custom_types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
{
"name": "Pokémon",
"sourceType": "Pokemon",
"icon": "paw",
"singular": "Pokémon",
"plural": "Pokémon"
},
{
"name": "Pokémon Type",
"sourceType": "Pokemon Type",
"icon": "fire",
"singular": "Pokémon Type",
"plural": "Pokémon Types"
},
{
"name": "Pokémon Generation",
"sourceType": "Pokemon Generation",
"icon": "gamepad",
"singular": "Generation",
"plural": "Generations"
}
]
31 changes: 31 additions & 0 deletions plugins/PokeAPI/v1/dataStreams/generationSummary.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "generationSummary",
"displayName": "Generation Summary",
"description": "Main region, games and the number of species, moves, abilities and types a generation introduced",
"tags": ["Generation"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "get",
"endpointPath": "/generation/{{object.rawId}}",
"postRequestScript": "generationSummary.js"
},
"matches": { "sourceType": { "type": "oneOf", "values": ["Pokemon Generation"] } },
"timeframes": false,
"metadata": [
{ "name": "generationId", "displayName": "Generation ID", "shape": "string", "visible": false },
{
"name": "generationName",
"displayName": "Generation",
"shape": "string",
"role": "label"
},
{ "name": "region", "displayName": "Region", "shape": "string" },
{ "name": "games", "displayName": "Games", "shape": "string" },
{ "name": "newSpecies", "displayName": "New Species", "shape": "number", "role": "value" },
{ "name": "newMoves", "displayName": "New Moves", "shape": "number" },
{ "name": "newAbilities", "displayName": "New Abilities", "shape": "number" },
{ "name": "newTypes", "displayName": "New Types", "shape": "number" },
{ "name": "typesIntroduced", "displayName": "Types Introduced", "shape": "string" },
{ "sourceId": "generationId", "sourceType": "Pokemon Generation", "name": "generationName" }
]
}
36 changes: 36 additions & 0 deletions plugins/PokeAPI/v1/dataStreams/generations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "generations",
"displayName": "Generations",
"description": "Pokémon game generations, from Generation I onwards",
"tags": ["Pokémon", "Generation"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "/generation",
"getArgs": [{ "key": "limit", "value": "100" }],
"pathToData": "results"
},
"matches": "none",
"timeframes": false,
"visibility": { "type": "hidden" },
"metadata": [
{ "name": "url", "displayName": "URL", "shape": "url", "visible": false },
{ "name": "name", "displayName": "Slug", "shape": "string", "visible": false },
{
"name": "id",
"displayName": "ID",
"shape": "string",
"role": "id",
"computed": true,
"valueExpression": "{{ $['url'].split('/').filter(Boolean).pop() }}"
},
{
"name": "generationName",
"displayName": "Generation",
"shape": "string",
"role": "label",
"computed": true,
"valueExpression": "{{ 'Generation ' + $['name'].split('-').pop().toUpperCase() }}"
}
]
}
40 changes: 40 additions & 0 deletions plugins/PokeAPI/v1/dataStreams/pokemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "pokemon",
"displayName": "Pokémon",
"description": "Every Pokémon species in the National Pokédex",
"tags": ["Pokémon"],
"baseDataSourceName": "httpRequestUnscoped",
"config": {
"httpMethod": "get",
"endpointPath": "/pokemon-species",
"pathToData": "results",
"paging": {
"mode": "nextUrl",
"pageSize": { "realm": "queryArg", "path": "limit", "value": "200" },
"in": { "realm": "payload", "path": "next" }
}
},
"matches": "none",
"timeframes": false,
"visibility": { "type": "hidden" },
"metadata": [
{ "name": "url", "displayName": "URL", "shape": "url", "visible": false },
{ "name": "name", "displayName": "Slug", "shape": "string", "visible": false },
{
"name": "id",
"displayName": "Pokédex No.",
"shape": "string",
"role": "id",
"computed": true,
"valueExpression": "{{ $['url'].split('/').filter(Boolean).pop() }}"
},
{
"name": "pokemonName",
"displayName": "Pokémon",
"shape": "string",
"role": "label",
"computed": true,
"valueExpression": "{{ $['name'].split('-').map(w => w.charAt(0).toUpperCase() + w.slice(1)).join(' ') }}"
}
]
}
23 changes: 23 additions & 0 deletions plugins/PokeAPI/v1/dataStreams/pokemonByGeneration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "pokemonByGeneration",
"displayName": "Pokémon by Generation",
"description": "Pokémon species introduced in a generation",
"tags": ["Generation", "Pokémon"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "get",
"endpointPath": "/generation/{{object.rawId}}",
"postRequestScript": "pokemonByGeneration.js"
},
"matches": { "sourceType": { "type": "oneOf", "values": ["Pokemon Generation"] } },
"timeframes": false,
"defaultShaping": { "sort": { "by": [["pokedexNumber", "asc"]] } },
"metadata": [
{ "name": "generationId", "displayName": "Generation ID", "shape": "string", "visible": false },
{ "name": "generationName", "displayName": "Generation", "shape": "string" },
{ "name": "pokemonId", "displayName": "Pokémon ID", "shape": "string", "visible": false },
{ "name": "pokemonName", "displayName": "Pokémon", "shape": "string", "role": "label" },
{ "name": "pokedexNumber", "displayName": "Pokédex No.", "shape": ["number", { "thousandsSeparator": false }] },
{ "sourceId": "pokemonId", "sourceType": "Pokemon", "name": "pokemonName" }
]
}
24 changes: 24 additions & 0 deletions plugins/PokeAPI/v1/dataStreams/pokemonByType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "pokemonByType",
"displayName": "Pokémon by Type",
"description": "Pokémon that have a type, with whether it is their primary or secondary type",
"tags": ["Type", "Pokémon"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "get",
"endpointPath": "/type/{{object.rawId}}",
"postRequestScript": "pokemonByType.js"
},
"matches": { "sourceType": { "type": "oneOf", "values": ["Pokemon Type"] } },
"timeframes": false,
"defaultShaping": { "sort": { "by": [["pokedexNumber", "asc"]] } },
"metadata": [
{ "name": "typeId", "displayName": "Type ID", "shape": "string", "visible": false },
{ "name": "typeName", "displayName": "Type", "shape": "string" },
{ "name": "pokemonId", "displayName": "Pokémon ID", "shape": "string", "sourceType": "Pokemon", "visible": false },
{ "name": "pokemonName", "displayName": "Pokémon", "shape": "string", "role": "label", "sourceId": "pokemonId", "sourceType": "Pokemon", "objectPropertyPath": "name" },
{ "name": "pokedexNumber", "displayName": "Pokédex No.", "shape": ["number", { "thousandsSeparator": false }] },
{ "name": "slot", "displayName": "Slot", "shape": "string" },
{ "sourceId": "pokemonId", "sourceType": "Pokemon", "name": "pokemonName" }
]
}
24 changes: 24 additions & 0 deletions plugins/PokeAPI/v1/dataStreams/pokemonMoves.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "pokemonMoves",
"displayName": "Pokémon Moves",
"description": "Moves a Pokémon can learn in the most recent game it appears in, with learn method and level",
"tags": ["Pokémon", "Moves"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "get",
"endpointPath": "/pokemon/{{object.rawId}}",
"postRequestScript": "pokemonMoves.js"
},
"matches": { "sourceType": { "type": "oneOf", "values": ["Pokemon"] } },
"timeframes": false,
"defaultShaping": { "sort": { "by": [["learnMethod", "asc"], ["level", "asc"]] } },
"metadata": [
{ "name": "pokemonId", "displayName": "Pokédex No.", "shape": "string", "visible": false },
{ "sourceId": "pokemonId", "sourceType": "Pokemon", "name": "pokemonName" },
{ "name": "pokemonName", "displayName": "Pokémon", "shape": "string" },
{ "name": "move", "displayName": "Move", "shape": "string", "role": "label" },
{ "name": "learnMethod", "displayName": "Learn Method", "shape": "string" },
{ "name": "level", "displayName": "Level", "shape": ["number", { "decimalPlaces": 0 }] },
{ "name": "game", "displayName": "Game", "shape": "string" }
]
}
32 changes: 32 additions & 0 deletions plugins/PokeAPI/v1/dataStreams/pokemonProfile.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "pokemonProfile",
"displayName": "Pokémon Profile",
"description": "Types, size, abilities, base stat total and artwork for a Pokémon",
"tags": ["Pokémon"],
"baseDataSourceName": "httpRequestScopedSingle",
"config": {
"httpMethod": "get",
"endpointPath": "/pokemon/{{object.rawId}}",
"postRequestScript": "pokemonProfile.js"
},
"matches": { "sourceType": { "type": "oneOf", "values": ["Pokemon"] } },
"timeframes": false,
"metadata": [
{ "name": "pokemonId", "displayName": "ID", "shape": "string", "visible": false },
{ "sourceId": "pokemonId", "sourceType": "Pokemon", "name": "pokemonName" },
{ "name": "pokemonName", "displayName": "Pokémon", "shape": "string", "role": "label" },
{ "name": "pokedexNumber", "displayName": "Pokédex No.", "shape": ["number", { "thousandsSeparator": false }] },
{ "name": "primaryType", "displayName": "Primary Type", "shape": "string" },
{ "name": "secondaryType", "displayName": "Secondary Type", "shape": "string" },
{ "name": "types", "displayName": "Types", "shape": "string" },
{ "name": "heightM", "displayName": "Height (m)", "shape": ["number", { "decimalPlaces": 1 }] },
{ "name": "weightKg", "displayName": "Weight (kg)", "shape": ["number", { "decimalPlaces": 1 }] },
{ "name": "baseExperience", "displayName": "Base Experience", "shape": "number" },
{ "name": "abilities", "displayName": "Abilities", "shape": "string" },
{ "name": "hiddenAbility", "displayName": "Hidden Ability", "shape": "string" },
{ "name": "statTotal", "displayName": "Base Stat Total", "shape": "number", "role": "value" },
{ "name": "artworkUrl", "displayName": "Artwork", "shape": ["url", { "label": "Official artwork" }] },
{ "name": "spriteUrl", "displayName": "Sprite", "shape": ["url", { "label": "Sprite" }] },
{ "name": "cryUrl", "displayName": "Cry", "shape": ["url", { "label": "Cry" }] }
]
}
Loading
Loading