GRESB interview question

How would you set up an API for this small method that we just created?