Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rewrite API to version 6 #516

Merged
merged 39 commits into from
Sep 19, 2021
Merged

feat: rewrite API to version 6 #516

merged 39 commits into from
Sep 19, 2021

Conversation

favna
Copy link
Member

@favna favna commented Sep 7, 2021

feat: rewrite API to version 6

feat: getFuzzy* queries can now return multiple results that match the fuzzy query. By default only 1 result is returned. You can modify this by passing the take parameter. Furthermore you can provide the offset parameter to skip that many items from the start, and the reverse parameter to reverse the array before applying take and offset.
feat: added the missing type-specific hidden powers

fix: also return base Pokémon data for getLearnset when only requesting backSprite and/or shinyBackSprite
fix: fixed hidden power being marked as a water type move
fix: fixed the basePower for the moves frustration and return
fix: fixed the cosmeticFormes for flabébé
fix: fixed the version_id (game) for Missingno's flavour text
fix: fixed the zMovePower for the moves frustration, return, seismic toss, and night shade
fix: fixed the bulbapedia URL for nidoran-female
fix: fixed the bulbapedia URL for nidoran-male
fix: fixed the quotes used in the flavour texts
fix: fixed the registered name for gengargmax
fix: fixed the way prefixed fuzzy queries are parsed. It is now possible to prefix with galarian, alolan, and gigantamax alongside their respective values of galar, alola and gmax.
fix: fixed various text issues in flavour texts, in particular garbled characters being in the place of the common é character
fix: when a move's z-move power cannot be computed the value of 0 is now returned, as opposed to Infinity, which would cause an error.

BREAKING CHANGE: removed DexEntry.evos property, if you want to get just the evolution names use evolutions { species }
BREAKING CHANGE: removed DexEntry.prevo property, if you want to get just the evolution names use preevolutions { species }
BREAKING CHANGE: removed DexEntry structure, most of its properties are merged into DexDetails
BREAKING CHANGE: removed getAbilityByFuzzy
BREAKING CHANGE: removed getAbilityByName
BREAKING CHANGE: removed getDexEntries
BREAKING CHANGE: removed getDexEntryByDexNumber
BREAKING CHANGE: removed getDexEntryBySpeciesName
BREAKING CHANGE: removed getItemByFuzzy
BREAKING CHANGE: removed getItemByName
BREAKING CHANGE: removed getMoveByFuzzy
BREAKING CHANGE: removed getMoveByName
BREAKING CHANGE: removed getTypeByName
BREAKING CHANGE: removed take, skip and reverse from getPokemon. They are renamed to takeFlavorTexts (default: 1), offsetFlavorTexts (default: 0), and reverseFlavorTexts (default: true)
BREAKING CHANGE: renamed Abilities enum to AbilitiesEnum
BREAKING CHANGE: renamed AbilityPaginatedArgs to FuzzyAbilityArgs
BREAKING CHANGE: renamed ExactPokemonPaginatedArgs to PokemonArgs
BREAKING CHANGE: renamed getAbilityDetailsByFuzzy to getFuzzyAbility
BREAKING CHANGE: renamed getAbilityDetailsByName to getAbility
BREAKING CHANGE: renamed getItemDetailsByFuzzy to getFuzzyItem
BREAKING CHANGE: renamed getItemDetailsByName to getItem
BREAKING CHANGE: renamed getMoveDetailsByFuzzy to getFuzzyMove
BREAKING CHANGE: renamed getMoveDetailsByName to getMove
BREAKING CHANGE: renamed getPokemonDetails to getPokemon
BREAKING CHANGE: renamed getPokemonDetailsByFuzzy to getFuzzyPokemon
BREAKING CHANGE: renamed getPokemonDetailsByName to getPokemonByName and getPokemonBySpecies
BREAKING CHANGE: renamed getPokemonDetailsByNumber to getPokemonByDexNumber
BREAKING CHANGE: renamed getPokemonLearnset to getLearnset
BREAKING CHANGE: renamed getPokemonLearnsetByFuzzy to getFuzzyLearnset
BREAKING CHANGE: renamed ItemPaginatedArgs to FuzzyItemArgs
BREAKING CHANGE: renamed Items enum to ItemsEnum
BREAKING CHANGE: renamed LearnsetFuzzyArgs to FuzzyLearnsetArgs
BREAKING CHANGE: renamed MovePaginatedArgs to FuzzyMoveArgs
BREAKING CHANGE: renamed Moves enum to MovesEnum
BREAKING CHANGE: renamed Pokemon enum to PokemonEnum
BREAKING CHANGE: renamed PokemonNumberPaginatedArgs to PokemonNumberArgs
BREAKING CHANGE: renamed PokemonPaginatedArgs to FuzzyPokemonArgs
BREAKING CHANGE: renamed Types enum to TypesEnum
BREAKING CHANGE: renamed the skip parameter for all getFuzzy* queries has been renamed to offset to better represent what it does.

BREAKING CHANGE: The following queries have been removed `getAbilityByFuzzy`, `getAbilityByName`, `getDexEntries`, `getDexEntryBySpeciesName`, `getDexEntryByDexNumber`, `getItemByFuzzy`, `getItemByName`, `getMoveByFuzzy`, `getMoveByName`, `getTypeByName`
@favna favna changed the title refactor: v6 feat: rewrite API to version 6 Sep 19, 2021
@favna favna marked this pull request as ready for review September 19, 2021 19:08
@favna favna merged commit 1925908 into staging Sep 19, 2021
@favna favna deleted the refactor/v6 branch September 19, 2021 19:08
favna added a commit that referenced this pull request Sep 19, 2021
feat: `getFuzzy*` queries can now return multiple results that match the fuzzy query. By default only 1 result is returned. You can modify this by passing the `take` parameter. Furthermore you can provide the `offset` parameter to skip that many items from the start, and the `reverse` parameter to reverse the array before applying `take` and `offset`.
feat: added the missing type-specific hidden powers

fix: also return base Pokémon data for `getLearnset` when only requesting `backSprite` and/or `shinyBackSprite`
fix: fixed `hidden power` being marked as a water type move
fix: fixed the `basePower` for the moves `frustration` and `return`
fix: fixed the `cosmeticFormes` for `flabébé`
fix: fixed the `version_id` (game) for Missingno's flavour text
fix: fixed the `zMovePower` for the moves `frustration`, `return`, `seismic toss`, and `night shade`
fix: fixed the bulbapedia URL for nidoran-female
fix: fixed the bulbapedia URL for nidoran-male
fix: fixed the quotes used in the flavour texts
fix: fixed the registered name for `gengargmax`
fix: fixed the way prefixed fuzzy queries are parsed. It is now possible to prefix with `galarian`, `alolan`, and `gigantamax` alongside their respective values of `galar`, `alola` and `gmax`.
fix: fixed various text issues in flavour texts, in particular garbled characters being in the place of the common `é` character
fix: when a move's z-move power cannot be computed the value of `0` is now returned, as opposed to `Infinity`, which would cause an error.

BREAKING CHANGE: removed `DexEntry.evos` property, if you want to get just the evolution names use `evolutions { species }`
BREAKING CHANGE: removed `DexEntry.prevo` property, if you want to get just the evolution names use `preevolutions { species }`
BREAKING CHANGE: removed `DexEntry` structure, most of its properties are merged into `DexDetails`
BREAKING CHANGE: removed `getAbilityByFuzzy`
BREAKING CHANGE: removed `getAbilityByName`
BREAKING CHANGE: removed `getDexEntries`
BREAKING CHANGE: removed `getDexEntryByDexNumber`
BREAKING CHANGE: removed `getDexEntryBySpeciesName`
BREAKING CHANGE: removed `getItemByFuzzy`
BREAKING CHANGE: removed `getItemByName`
BREAKING CHANGE: removed `getMoveByFuzzy`
BREAKING CHANGE: removed `getMoveByName`
BREAKING CHANGE: removed `getTypeByName`
BREAKING CHANGE: removed `take`, `skip` and `reverse` from `getPokemon`. They are renamed to `takeFlavorTexts` (default: 1), `offsetFlavorTexts` (default: 0), and `reverseFlavorTexts` (default: true)
BREAKING CHANGE: renamed `Abilities` enum to `AbilitiesEnum`
BREAKING CHANGE: renamed `AbilityPaginatedArgs` to `FuzzyAbilityArgs`
BREAKING CHANGE: renamed `ExactPokemonPaginatedArgs` to `PokemonArgs`
BREAKING CHANGE: renamed `getAbilityDetailsByFuzzy` to `getFuzzyAbility`
BREAKING CHANGE: renamed `getAbilityDetailsByName` to `getAbility`
BREAKING CHANGE: renamed `getItemDetailsByFuzzy` to `getFuzzyItem`
BREAKING CHANGE: renamed `getItemDetailsByName` to `getItem`
BREAKING CHANGE: renamed `getMoveDetailsByFuzzy` to `getFuzzyMove`
BREAKING CHANGE: renamed `getMoveDetailsByName` to `getMove`
BREAKING CHANGE: renamed `getPokemonDetails` to `getPokemon`
BREAKING CHANGE: renamed `getPokemonDetailsByFuzzy` to `getFuzzyPokemon`
BREAKING CHANGE: renamed `getPokemonDetailsByName` to `getPokemonByName` and `getPokemonBySpecies`
BREAKING CHANGE: renamed `getPokemonDetailsByNumber` to `getPokemonByDexNumber`
BREAKING CHANGE: renamed `getPokemonLearnset` to `getLearnset`
BREAKING CHANGE: renamed `getPokemonLearnsetByFuzzy` to `getFuzzyLearnset`
BREAKING CHANGE: renamed `ItemPaginatedArgs` to `FuzzyItemArgs`
BREAKING CHANGE: renamed `Items` enum to `ItemsEnum`
BREAKING CHANGE: renamed `LearnsetFuzzyArgs` to `FuzzyLearnsetArgs`
BREAKING CHANGE: renamed `MovePaginatedArgs` to `FuzzyMoveArgs`
BREAKING CHANGE: renamed `Moves` enum to `MovesEnum`
BREAKING CHANGE: renamed `Pokemon` enum to `PokemonEnum`
BREAKING CHANGE: renamed `PokemonNumberPaginatedArgs` to `PokemonNumberArgs`
BREAKING CHANGE: renamed `PokemonPaginatedArgs` to `FuzzyPokemonArgs`
BREAKING CHANGE: renamed `Types` enum to `TypesEnum`
BREAKING CHANGE: renamed the `skip` parameter for all `getFuzzy*` queries has been renamed to `offset` to better represent what it does.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant