All Projects → jalyna → Oakdex Pokedex

jalyna / Oakdex Pokedex

Licence: mit
Ruby Gem and Node Package for comprehensive Generation 1-7 Pokedex data, including 809 Pokémon, uses JSON schemas to verify the data

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Oakdex Pokedex

Uvicorn Gunicorn Fastapi Docker
Docker image with Uvicorn managed by Gunicorn for high-performance FastAPI web applications in Python 3.6 and above with performance auto-tuning. Optionally with Alpine Linux.
Stars: ✭ 1,014 (+2204.55%)
Mutual labels:  json-schema, json
Full Stack Fastapi Postgresql
Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Docker, automatic HTTPS and more.
Stars: ✭ 7,635 (+17252.27%)
Mutual labels:  json-schema, json
Plank
A tool for generating immutable model objects
Stars: ✭ 449 (+920.45%)
Mutual labels:  json-schema, json
Pyjfuzz
PyJFuzz - Python JSON Fuzzer
Stars: ✭ 342 (+677.27%)
Mutual labels:  json-schema, json
Movement
Movement is an easier, simpler way to explore and use NIEM. Want to join the Movement and contribute to it? Start here.
Stars: ✭ 19 (-56.82%)
Mutual labels:  json-schema, json
Json
C++ header-only JSON library
Stars: ✭ 343 (+679.55%)
Mutual labels:  json-schema, json
Json Forms
JSON Schema to HTML form generator, supporting dynamic subschemas (on the fly resolution). Extensible and customizable library with zero dependencies. Bootstrap add-ons provided
Stars: ✭ 549 (+1147.73%)
Mutual labels:  json-schema, json
Full Stack Fastapi Couchbase
Full stack, modern web application generator. Using FastAPI, Couchbase as database, Docker, automatic HTTPS and more.
Stars: ✭ 243 (+452.27%)
Mutual labels:  json-schema, json
Quicktype
Generate types and converters from JSON, Schema, and GraphQL
Stars: ✭ 7,459 (+16852.27%)
Mutual labels:  json-schema, json
Conf
Simple config handling for your app or module
Stars: ✭ 707 (+1506.82%)
Mutual labels:  json-schema, json
Json Schema Validator
A fast Java JSON schema validator that supports draft V4, V6, V7 and V2019-09
Stars: ✭ 292 (+563.64%)
Mutual labels:  json-schema, json
Fastapi
FastAPI framework, high performance, easy to learn, fast to code, ready for production
Stars: ✭ 39,588 (+89872.73%)
Mutual labels:  json-schema, json
Json Schema To Ts
Infer TS types from JSON schemas 📝
Stars: ✭ 261 (+493.18%)
Mutual labels:  json-schema, json
Vue Json Ui Editor
Edit JSON in UI form with JSON Schema and Vue.js
Stars: ✭ 392 (+790.91%)
Mutual labels:  json-schema, json
Vue Form Json Schema
Create forms using JSON schema. Bring your components!
Stars: ✭ 253 (+475%)
Mutual labels:  json-schema, json
Jsonforms
Customizable JSON Schema-based forms with React, Angular and Vue support out of the box.
Stars: ✭ 542 (+1131.82%)
Mutual labels:  json-schema, json
Vue Json Edit
Visual JSON editor built as an vue component. Provides a basic GUI
Stars: ✭ 207 (+370.45%)
Mutual labels:  json-schema, json
Jsonon
A json online view
Stars: ✭ 228 (+418.18%)
Mutual labels:  json-schema, json
Jsonschema2pojo
Generate Java types from JSON or JSON Schema and annotate those types for data-binding with Jackson, Gson, etc
Stars: ✭ 5,633 (+12702.27%)
Mutual labels:  json-schema, json
Spectral
A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v2 & v3.
Stars: ✭ 876 (+1890.91%)
Mutual labels:  json-schema, json

fixer

Gem Version npm version Build Status Code Climate Test Coverage Issue Count

Getting Started

Ruby

Add oakdex to your Gemfile and do bundle install:

gem 'oakdex-pokedex'

Then you can use the library:

require 'oakdex/pokedex'

eevee = Oakdex::Pokedex::Pokemon.find('Eevee')
# => #<Oakdex::Pokedex::Pokemon:0x007fe3dd6a88f8 @attributes={"names"=>{"fr"=>"Évoli", "de"=>"Evoli", "it"=>"Eevee", "en"=>"Eevee"}, "national_id"=>133 ...>

bulbasaur = Oakdex::Pokedex::Pokemon.find(1)
# => #<Oakdex::Pokedex::Pokemon:0x007fe3dc55da80 @attributes={"names"=>{"fr"=>"Bulbizarre", "de"=>"Bisasam", ...>

bulbasaur.name
# => "Bulbasaur"

bulbasaur.name('de')
# => "Bisasam"

bulbasaur.types
# => ["Grass", "Poison"]

bulbasaur.attributes
# => {"names"=>{"fr"=>"Bulbizarre", "de"=>"Bisasam", "it"=>"Bulbasaur", "en"=>"Bulbasaur"}, "national_id"=>1, "types"=>["Grass", "Poison"], "abilities"=>[{"name"=>"Overgrow"}, {"name"=>"Chlorophyll", "hidden"=>true}], "gender_ratios"=>{"male"=>87.5, "female"=>12.5}, "catch_rate"=>45, "egg_groups"=...}

tackle = Oakdex::Pokedex::Move.find('Tackle')
# => #<Oakdex::Pokedex::Move:0x007fbc9a10cda0 @attributes={"index_number"=>33, "pp"=>35, "max_pp"=>56, "power"=>50, "accuracy"=>100, "category"=>"physical", "priority"=>0, "target"=>"target", ...>

potion = Oakdex::Pokedex::Item.find('Potion')
# => #<Oakdex::Pokedex::Item:0x007fd48f1b14b0 @attributes={"names"=>{"en"=>"Potion", "de"=>"Trank", "fr"=>"Potion, ...>

contrary = Oakdex::Pokedex::Ability.find('Contrary')
# => #<Oakdex::Pokedex::Ability:0x007fbc9b033540 @attributes={"index_number"=>126, "names"=>{"fr"=>"Contestation", "de"=>"Umkehrung", "it"=>"Inversione", "en"=>"Contrary"}, "descriptions"=>{"en"=>"Inverts stat modifiers.", "de"=>"Attacken, die einen Statuswert des Pokémon erhöhen würden, senken ihn und umgekehrt."}}>

fairy = Oakdex::Pokedex::Type.find('Fairy')
# => #<Oakdex::Pokedex::Type:0x007fbc9a943c30 @attributes={"names"=>{"de"=>"Fee", "gr"=>"νεράιδα Neraida", "it"=>"Folletto", "pl"=>"Baśniowy (XY13) Bajkowy (XY46)", "en"=>"Fairy"}, "effectivness"=>{"Normal"=>1.0, "Fighting"=>2.0, "Flying"=>1.0, "Poison"=>0.5, "Ground"=>1.0, "Rock"=>1.0, "Bug"=>1.0, "Ghost"=>1.0, "Steel"=>0.5, "Fire"=>0.5, "Water"=>1.0, "Grass"=>1.0, "Electric"=>1.0, "Psychic"=>1.0, "Ice"=>1.0, "Dragon"=>2.0, "Dark"=>2.0, "Fairy"=>1.0}, "color"=>"#D685AD"}>
fairy.effectivness_for('Dark')
# => 2.0

water1 = Oakdex::Pokedex::EggGroup.find('Water 1')
# => #<Oakdex::Pokedex::EggGroup:0x007fbc9a853398 @attributes={"names"=>{"en"=>"Water 1", "jp"=>"すいちゅう1 (水中1) Suichū1", "fr"=>"Eau 1", "de"=>"Wasser 1", "it"=>"Acqua 1", "es"=>"Agua 1"}}>

generation6 = Oakdex::Pokedex::Generation.find('Generation VI')
# => #<Oakdex::Pokedex::Generation:0x007fbc9b0382c0 @attributes={"number"=>6, "dex_name"=>"kalos_id", "names"=>{"en"=>"Generation VI", "de"=>"Generation VI"}, "games"=>[{"en"=>"X", "de"=>"X"}, {"en"=>"Y", "de"=>"Y"}, {"en"=>"Omega Ruby", "de"=>"Omega Rubin"}, {"en"=>"Alpha Sapphire", "de"=>"Alpha Saphir"}]}>

bold = Oakdex::Pokedex::Nature.find('Bold')
# => #<Oakdex::Pokedex::Nature:0x007fbc9a92b2c0 @attributes={"names"=>{"en"=>"Bold", "de"=>"Kühn"}, "increased_stat"=>"def", "decreased_stat"=>"atk", "favorite_flavor"=>"Sour", "disliked_flavor"=>"Spicy"}>


Oakdex::Pokedex::Pokemon.all.size
# => 809
Oakdex::Pokedex::Pokemon.where(type: 'Dark').size
# => 46
Oakdex::Pokedex::Pokemon.where(egg_group: 'Human-Like').size
# => 52
Oakdex::Pokedex::Pokemon.where(dex: 'alola').size
# => 307
Oakdex::Pokedex::Pokemon.where(alola_id: 1)
# => [#<Oakdex::Pokedex::Pokemon:0x007fbc9e542510 @attributes={"names"=>{"en"=>"Rowlet", "jp"=>"モクロー Mokuroh", "fr"=>"Brindibou", "es"=>"Rowlet", "de"=>"Bauz", "it"=>"Rowlet"}, "national_id"=>722, "alola_id"=>1, ...>]

Oakdex::Pokedex::Move.where(type: 'Ground').size
# => 26

Oakdex::Pokedex::Item.all.size
# => 69, still WIP

Oakdex::Pokedex::Item.where(category: 'Potion').size
# => 5

Javascript

Install the package:

$ npm install oakdex-pokedex --save

Then you can use the library:

oakdexPokedex = require('oakdex-pokedex');

const eevee = oakdexPokedex.findPokemon('Eevee')
// returns data/pokemon/eevee.json
console.log(eevee.names.en); // Eeevee

const charmander = oakdexPokedex.findPokemon(4)
// returns data/pokemon/charmander.json
console.log(charmander.names.en); // Charmander

const tackle = oakdexPokedex.findMove('Tackle')
// returns data/move/tackle.json
console.log(m.names.en); // Tackle

const potion = oakdexPokedex.findItem('Potion')
// returns data/item/potion.json
console.log(m.names.en); // Potion

const contrary = oakdexPokedex.findAbility('Contrary')
// returns data/ability/contrary.json
console.log(a.names.en); // Contrary

const fairy = oakdexPokedex.findType('Fairy')
// returns data/type/fairy.json
console.log(fairy.names.en); // Fairy

const water1 = oakdexPokedex.findEggGroup('Water 1')
// returns data/egg_group/water_1.json
console.log(water1.names.en); // Water 1

const genVI = oakdexPokedex.findGeneration('Generation VI')
// returns data/generation/6.json
console.log(genVI.names.en); // Generation VI

const bold = oakdexPokedex.findNature('Bold')
// returns data/nature/bold.json
console.log(bold.names.en); // Bold

const allPokemon = oakdexPokedex.allPokemon()
console.log(allPokemon.length); // 809

const allItems = oakdexPokedex.allItems()
console.log(allItems.length); // 69, WIP

const darkPokemon = oakdexPokedex.allPokemon({ type: 'Dark' })
console.log(darkPokemon.length); // 46

const humanLike = oakdexPokedex.allPokemon({ egg_group: 'Human-Like' })
console.log(humanLike.length); // 52

const alola = oakdexPokedex.allPokemon({ dex: 'alola' })
console.log(alola.length); // 302

const moves = oakdexPokedex.allMoves({ type: 'Ground' })
console.log(moves.length); // 26

Add custom Pokemon / Fakemon

You can add your own Pokémon and it will be checked if it is valid. You can and should add them as a batch as evolutions need to present at the same time.

Fakemon need to have a national_id that is greater than 10000.

Checkout the fakemon examples.

fakemon_stage1 = File.read('my_fakemon1.json')
fakemon_stage2 = File.read('my_fakemon2.json')

Oakdex::Pokedex::Pokemon.import!([fakemon_stage1, fakemon_stage2])

Oakdex::Pokedex::Pokemon.find('My Fakemon')
fakemonStage1 = fs.readFileSync('./fixtures/my_fakemon1.json', 'utf8')
fakemonStage2 = fs.readFileSync('./fixtures/my_fakemon2.json', 'utf8')

oakdexPokedex.importPokemon([fakemonStage1, fakemonStage2])

oakdexPokedex.findPokemon('My Fakemon')

Schemas

If you want to know what the structure of the given data is, checkout the following documentations:

Sprites

If you want also to include sprites in your pokedex, check out oakdex-pokedex-sprites.

Contributing

I would be happy if you want to add your contribution to the project. In order to contribute, you just have to fork this repository.

Please respect the Code of Conduct.

Minify json files before releasing new version:

$ rake compress_data:run

License

MIT License. See the included MIT-LICENSE file.

Credits

Logo Icon by Roundicons Freebies.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].