brilam / quickpokedex-old Goto Github PK
View Code? Open in Web Editor NEWA quick Pokedex for Android
A quick Pokedex for Android
Currently, it takes roughly 12 to 15 minutes to populate the database (parsing and insertion of 12 Pokemon types, and parsing and insertion of 811 Pokemon) on a decent computer. This seems to be a bit unreasonable and it would be even worse on a mobile device running on Android. It takes roughly 24s to insert 10 pokemon (this includes parsing time and insertion time) and inserting the 12 Pokemon types.
Currently, the parsing of Pokemon is simplified and only parses: ID, name, height, weight and base experience. This information isn't enough and should also include stats, abilities and types.
Currently, Pokemon with IDs of 722+ are incomplete (PokeAPI doesn't have information on it, since there is no information for it to scrape from at Veekun). In this case, a failsafe should be made so no SQL exceptions should occur ungracefully.
To-do: Just insert the Pokemon ID into the database for now and provide default values to insert when the information cannot be parsed.
To improve user experience, it is a good idea to do a version check for the database, and if there exists a new version of the database, it should be downloaded. And it should then check for PokeAPI for newer information.
App version check: http://brian-lam.me/quick-pokedex/app_version.json
Make a GET response to here.
Download database from: http://brian-lam.me/quick-pokedex/pokedex.db
Found a bug. For some odd reason, parsing doesn't work sometimes on
Pokemon that have data. Need to look into further.
Searching through the Pokedex based on a criteria such as by ID range, by name would be helpful to the user.
Different error codes should have different handling. In the case that that the resource is not there, the API returns a response code of 404.
Below is an example:
http://pokeapi.co/api/v2/pokemon/722/
{"detail":"Not found."}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.