I am working on an extension which requires me to use Civi Contribute.Yet i have not tried anything yet as i don't now the approach, so i wish to obtain the details of a particular contribution transaction such as total_amount, email ... so that i can use it in the extension, I have thought of using an API method but i am not clear of the details and if at all that is what i have to use. Something like the content of $params?
I think you are looking for the API getfields action? In the API explorer you can do a getfields and it will show you the possible fields for the API.
Using the API is the recommended way to access CiviCRM information from an extension, so you are on the right tracks. You can study https://github.com/cividesk/com.cividesk.cardreader/blob/master/CRM/Cardreader/Page/Callback.php#L50 for an example on how to call the CiviCRM API. You need to read https://wiki.civicrm.org/confluence/display/CRMDOC/API+Reference and use the API explorer to get familiar with the API. You can access the API explorer by using the slug civicrm/api/explorer on your CiviCRM instance.