gdirk07 / PokemonChecker

Playing around with APIs
https://gdirk07.github.io/PokemonChecker/
0 stars 0 forks source link

Fixed Names of Pokemon #30

Closed gdirk07 closed 2 years ago

gdirk07 commented 2 years ago

Names in the Pokemon API only used "-" for special characters so I created a function to apply the proper name as the series gave them.

To help with this I created a subdirectory "utils" which contain

  1. hardcoded values for special cased pokemon
  2. A file we can use to store helper functions. This structure is subject to change but for the time being it works

Resolves issue #28

gdirk07 commented 2 years ago

I think something to potentially explore is how special characters (♂, ♀ etc) will have an affect on various browser and potentially devices.

jeremy-jtlo commented 2 years ago

Just got back to this

If we want to continue this route, can we move any constants to the constants/ directory? I'd save utils/ for classes that do things not necessarily bound to any of our data types.

gdirk07 commented 2 years ago

Missed the comment. I moved the name exception constants to constants/ and renamed Helper into a more specific name because both APP and Factory currently use it. If we ever reference Pokemon in the API for the purpose of displaying in the UI we will need the API to fix the name. I'll leave it up to you if we keep that in utils/ or move it somewhere else