AD1616 / ADfastpages

Apache License 2.0
0 stars 1 forks source link

Week 13 APCalendar Implementation #9

Open AD1616 opened 1 year ago

AD1616 commented 1 year ago

There is a new method in the APCalendar class to generate a url to call a car API, taking in parameters of a year and a car brand. There are new attributes in the Year class to support the APCalendar method implementation. The controller maps URL to function that calls API. URL serves as input of year and brand, which are then passed to year object. Year object uses APCalendar method to generate URL for API. Then, the controller function uses that URL to call the API and return JSON.

Live Demo: Find all cars of brand Honda from year 2013: https://breadbops.gq/api/calendar/fetchCars/honda/2013

Images of API Testing for this URL: https://breadbops.gq/api/calendar/fetchCars/honda/2013

CURL

image

BROWSER

image

POSTMAN

image

Using the VSCode Debugger

image
jm1021 commented 1 year ago

3