Frannsoft / FrannHammer

Restful api for Smash 4 and Ultimate frame data as told by KuroganeHammer.
MIT License
42 stars 0 forks source link

Extra move data needs to only be returned as parsed info if the consumer wants it #274

Closed Frannsoft closed 5 years ago

Frannsoft commented 5 years ago

Example: Ryu's Ultimate airdodge HitboxActive = 3-27 with no extra information on the tooltip like 'adv: x' This produces a response property of HitboxActive.Frames = "3-27" and HitboxActive.Adv = null

Ryu's Ultimate Light Jab 1 HitboxActive = 3-4 with tooltip info of 'adv: -10' This produces a response property of HitboxActive.Frames = "3-4" and HitboxActive.Adv = "-10"

Meanwhile all Smash4 data has no tooltip info: Ryu's Smash4 Light Jab 1 HitboxActive = 2-3 with no extra info This produces a response property of HitboxActive = "2-3"

I think a decent way to go about this is to add a query parameter to moves routes so the consumer can get back data outside of the 'normal' data.

For the examples above: Ryu's Ultimate Light Jab 1 requested with query param of expand=true would return the response with HitboxActive.Frames = "3-4" and HitboxActive.Adv = "-10". By default this query param would be sent in as false so existing usage isn't broken. When the query param is not sent in or is set to expand=false Ryu's Ultimate Light Jab 1 is returned as HitboxActive = "3-4"

This pattern can be used with Smash4 data as well as Ultimate data.