Pokemon GO project data generator
npm install pogo-data-generator

Generates templated data for Pokemon GO related projects, including:
- Pokemon
- Forms
- Costumes
- Moves
- Items
- Team Rocket Invasions
- Pokemon Types
- Weather
- Translations
- Quest Conditions
- Quest Types
- Quest Reward Types
- Future Pokemon via PokeAPI
``markdown
// with npm
npm install pogo-data-generator
// with yarn
yarn add pogo-data-generator
`
Usage:
`js
// commonJS
const { generate } = require('pogo-data-generator')
// es6 with invasion function
import { generate, invasions } from 'pogo-data-generator'
const data = await generate() // returns the default settings
const template = {
pokemon: {
enabled: true,
options: {
snake_case: true,
unsetDefaultForm: true,
},
template: {
pokemonName: true,
pokedexId: true,
forms: {
formName: true,
proto: true,
},
},
},
types: {
enabled: true,
template: {
typeName: true,
},
},
moves: {
enabled: false,
},
items: {
enabled: true,
options: {
customFields: {
itemId: 'id',
},
},
template: {
itemId: true,
type: true,
minTrainerLevel: true,
},
},
questRewards: {
enabled: false,
},
questConditions: {
enabled: false,
},
invasions: {
enabled: true,
},
weather: {
enabled: true,
},
translations: {
enabled: true,
options: {
masterfileLocale: 'de',
},
locales: {
en: true,
de: true,
},
},
}
const customData = await generate({ template }) // returns custom templated data
const tr = await invasions()
// returns the default settings
`
1. Clone the repo
2. yarn installtsc
3. will compile the TS into JS, then you can run yarn generate, which will generate a local masterfile.json for you to checkout
- tsc -w will auto recompile the TypeScript during developmentpackage.json
- You can play with the input options by changing the scripts in or modifying the base.ts file.yarn pokeapi
- , which will generate a local masterfile.json and refresh the data in the static folder from PokeAPI--pokeapi-staging
- Append to target https://staging.pokeapi.co/api/v2 when regenerating from PokeAPIyarn raw
- will generate a local masterfile.json and with the raw data format
The generate function accepts an object with the following properties:
- template (object): Your template for each of the categoriessafe
- (boolean): Fetches an already built masterfile with known safe valuesurl
- (string): Custom url to fetch the masterfile from, results not guaranteedtest
- (boolean): Writes the masterfile to a local jsonraw
- (boolean): Returns the data in its raw format without any template processingpokeApi
- (boolean): Fetches fresh data from PokeAPIpokeApiBaseUrl
- (string): Overrides the default PokeAPI endpoint (defaults to https://pokeapi.co/api/v2`)
To view some static examples of what this library can create, check out these repos:
Masterfiles
Translations
To view the full list of available options, check out the Wiki!