Vjp888 / mount_olympus_api

A tech challenge for to organize historic data from previous Olympic Games
1 stars 0 forks source link

Creates the /api/v1/olympians endpoint #16

Closed Vjp888 closed 5 years ago

Vjp888 commented 5 years ago

What functionality does this accomplish?

closes #10 closes #11 closes #12

Description: Moves Sport from event to olympian as it is exceedingly rare for olympians to have multiple sports Updates validations for new schema design Updates Seed data to reflect new Schema Adds Route for /api/v1/olympians Adds and Removes FastJson API when I realized that the format was imcompatible Creates Serializer for modeling data - retooled FastJsonSerializer - works well Creates Controller for Olympians with Index Path Creates Happy path test for olympians error Adjusts Olympian Controller Index to allow for Age queries Creates Model check for age queries to return singular olympians when called Fails gracefully when there are no olympians or if bad queries are sent Adds tests for olympian class method params_check

Visually checked it with the live data set and it all comes back in the correct format (Yay!)

What did you struggle on to complete?

It took me a little while to realize that The fast JSON gem was a bad approach as it was outputting data in a way that was against what the spec wanted.

Another oddball point was making sure my case statement was working correctly in the parameters check, though that will need to be retooled if I ever need to take on other params.

Current Test Suite:

Test Coverage Percentage: 100%

Checklist:

Please include an emoji of how you feel about this branch: