ahisham,
It appears to me that you might be trying to mix functions for GUI plugins together with Metadata Download plugins. The Calibre APIs are very different.
Metadata Download plugins use: class calibre.ebooks.metadata.sources.base
GUI plugins use: class calibre.gui2.actions.InterfaceAction
Also, be aware that if you modify standard Calibre software, your modifications will be overwritten the next time you upgrade Calibre to the latest version (which happens every Friday). So, changing "src/calibre/ebooks/metadata/sources/amazon.py" itself is not recommended.
The only help I can give to you is to refer you to:
http://manual.calibre-ebook.com/plugins.html .