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.
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
BROWSER
POSTMAN
Using the VSCode Debugger