We proceed with the recipe as follows:
- The code of the API for this recipe is in 09/03/api.py. This script adds an additional class, JobListingSkills, with the following implementation:
class JobListingSkills(Resource): def get(self, job_listing_id): print("Request for job listing's skills with id: " + job_listing_id) skills = get_job_listing_skills(job_listing_id) print("Got the following skills as a response: " + skills) return skills
This implementation is similar to that of the previous recipe, except that it calls the new function for getting skills.
- We still need to add a statement to inform Flask-RESTful how to map URLs to this classes' get method. Since we are actually looking at retrieving a sub-property of the larger ...