Closed mdewey closed 5 years ago
I got caught up with my capstone and didn't plan accordingly in order to finish this assignment. Plan to complete it today.
Realized that I did not satisfy the entire assignment bc I was looking at a previous instruction. I added the correct links to my GitHub repos of the backend and frontend of the Safari Adventure assignment. Was able to get the total number of animals to render along with the other requirements.
Finish the Safari
For this assignment, you should take your safari API that was already created, and create a simple react app that consumes that API.
Objectives
Requirements
Explorer Mode (C#)
[ ] Add 3 the endpoints to the Safari API
GET /Animal/{location}
that returns animals of only that locationPUT /Animal/{id}
endpoint that adds 1 to the count of times seen for that animal (given by id)DELETE /Animal/{id}
endpoint that deletes that animal id from the database[ ] Create a simple react app, that uses some css make it looks friendly.
[ ] The react app should:
Jungle
Desert
.CountOfTimesSeen
and get a total number of animals seenCountOfTimesSeen
oflions
,tigers
andbears
Don't be afraid to add endpoints to make your life easier.
Explorer Mode (Ruby)
IMPORTANT To add a react app we need to update our Rails application a little.
Setup for adding a React app
Gemfile
, uncomment the line containingrack-cors
bundle
cors.rb
change the textorigins 'example.com'
toorigins '*'
cors.rb
uncomment lines 8 through 16. (Line 8 should sayRails.application.config.middleware.insert_before 0, Rack::Cors do
and line 16 should be anend
Assignment
[ ] Add these features to the Safari API
GET /animals?location={location}
that returns animals of only that locationPUT /animals/count/{id}
endpoint that adds 1 to the count of times seen for that animal (given by id)[ ] Create a simple react app, that uses some CSS make it looks friendly.
[ ] The react app should:
seen_count
seen_count
forlions
,tigers
andbears
Don't be afraid to add endpoints to make your life easier.
Adventure Mode