I am 90% done building a plugin that uses the Amazon.com API. What I have built is a Books Custom Post Type.
My Books CPT has Custom Taxonomies for Book Category, Book Tags, Book Author, and Book Publisher/company
I then have a Settings page that allows you to Import a list of Books from Amazon using there API, you insert the ASIN ID number, 1 per line in a textarea field and then I import each book as a Book CPT and assign the custom taxonomies listed above.
The only thing I am missing at this point is the ability to upload the image that is returned from the Amazon API, I get a URL to the image. I need to upload the image and assign it as the Featured Image for the post it is creating.
I have not been able to find a solution for this yet, can anyone help with some code to upload an image in WordPress from a URL and then assign it as a featured image to a post?