Method to Get the Item related to In Basket Activity

Hi all, I am trying to write a method to get the Item that is linked to the inbasket task of a user. What is the recommended way to writeup method code to get the Item dynamically? Any input would be very helpful. Thanks!