Skip to content
This repository was archived by the owner on Dec 1, 2022. It is now read-only.

How to test out the Ultimate support changes

Jordan Polaniec edited this page Feb 8, 2019 · 3 revisions

The Testing endpoint is now live for Ultimate support!

Thank you to all who use this API. Feedback is welcome on all of the changes below. You can create an Issue in this repository or message me on twitter at franndotexe.

The url to use for testing is: https://test-khapi.frannsoft.com/api.

NOTE: This is only the testing url. The production url will be different.

To test out the changes mentioned below check out the new Swagger page here!

Swagger Docs

All credit for actual frame data descriptions come from @KuroganeHammer and his site. Data is pulled with permission.

There have been some significant changes made to the API. One of my highest priorities with these changes is backwards compatibility and not breaking existing apps so you'll notice that Smash4 is used as a default for some new values. Depending on how usage of Ultimate data vs. Smash4 data goes in the future, that can be reevaluated.

I recommend using the new Related property data that is present on responses to explore the API.

Major changes

TL;DR version:

At the above URL:

  • Ultimate data from @Kuroganehammer's site is now present
  • Can query data by game with the new game query parameter
  • Removed some unused endpoints
  • Check out the new Related property on API responses
  • Ultimate data shown in tooltips is partially available with the new expand query parameter (WIP)

The details:

Ultimate data from @Kuroganehammer's site is now present - #262

Please note that available Ultimate data reflects what is available on @KuroganeHammer's site currently. I try to update the API soon after site updates are made. Check out the next list item to see how to best request this data.

Added support for querying data by game - #259

The game query parameter can be added to many routes to filter between Smash4 data and Ultimate data.

Example: api/characters?game=ultimate -> Only data available for characters in Ultimate will be returned.

By default for backwards compatibility, Smash4 will be the game specified. This means if no game query parameter is passed in the request URL, Smash4 data will be returned if available. If data is requested and no game query parameter passed, data for Smash4 will be checked first. If nothing is found, Ultimate data will then be searched. Use the Related property data to help with forming URLs.

An example: api/characters/name/wolf -> will search Smash4 data first, find nothing, then search Ultimate data and return Wolf's available data. The optimal request would be api/characters/name/wolf?game=ultimate. With this request, Smash4 data will not be searched.

My intent with this design was to help support backwards compatibility and ease of use. I'm sure it will evolve with feedback.

Some endpoints have been removed, due to lack of usage (potentially breaking change) - #258

The following endpoints have been removed. They required a sizable amount of work to support and in total, made up for less than 1% of the total KH api requests over the last year (2018):

characters/name/moves/search
characters/id/moves/search
characters/name/movements/search
characters/id/movements/search
characters/name/details
characters/id/details
characters/name/detailedmoves
characters/id/detailedmoves
moves/name/property
moves/id/property

Hypermedia details are now concrete properties instead of just an array - #265

Previously, related data for a character existed in the Links property in the response object. This was just a collection of URLs. To find a specific one people would have to filter to find what they wanted in the collection.

Now, these URLs are exposed in the Related property. Here's an example from api/characters/name/ken?game=ultimate:

...rest of response data,
"Related":{  
      "Smash4":null,
      "Ultimate":{  
         "Self":"http://test-khapi.frannsoft.com/api/characters/name/Ken?game=ultimate",
         "Moves":"http://test-khapi.frannsoft.com/api/characters/name/Ken/moves?game=ultimate",
         "Movements":"http://test-khapi.frannsoft.com/api/characters/name/Ken/movements?game=ultimate",
         "Attributes":"http://test-khapi.frannsoft.com/api/characters/name/Ken/characterattributes?game=ultimate"
      }
}

This should make it much easier to explore the API. The Links property will remain for backwards compatibility.

(WIP) With the new expand query parameter, the data contained in Ultimate character data tooltips is parsed - #261

The mechanism for exposing this data for people to use is complete, but support for getting all the different types of data present in these tooltips is still being developed. To get at the data currently available in the API use the new expand query parameter that's available on the majority of /moves endpoints:

Here's an example: api/characters/name/ganondorf?game=ultimate&expand=true returns move data like below: NOTE the HitboxActive and BaseDamage properties:

{  
      "HitboxActive":{  
         "Frames":"7-8",
         "Adv":"-8"
      },
      "BaseDamage":{  
         "Normal":"11",
         "OneVOne":"13.2"
      },
      "InstanceId":"ff3a48be1775473b9964fc1f442017cb",
      "Name":"Jab 1",
      "OwnerId":15,
      "Owner":"Ganondorf",
...rest of move data

By default, the expand query parameter will be set to false. This means move response data will not contain the tooltip data:

 "InstanceId":"ff3a48be1775473b9964fc1f442017cb",
      "Name":"Jab 1",
      "OwnerId":15,
      "Owner":"Ganondorf",
      "HitboxActive":"7-8",
      "FirstActionableFrame":"27",
      "BaseDamage":"11",
...rest of move data

Feedback is definitely welcome on the usability of this approach, especially considering the large amount of data that is exposed this way on the web site.

Minor changes

  • Missing Smash4 Character Attribute data added - #248
  • Ness missing Run Speed on Smash4 Character Attributes - #256
  • PAC-MAN's grabs header listed on Moves - #257

Technical changes

  • The API was migrated from ASP.NET Full Framework to ASP.NET Core - #260
  • KH site data is now stored entirely in memory instead of in an external store - #263

For a full list of changes check out the v0.7.0 Milestone