Hi, guys.
This is a general question, so I won't name which site's API I am refering to.
OK, lets say the API gives me access to some objects (books/other products). I want to give my users the ability to "store" some of these objects in my app's db so that later they could "review" them again.
My question is about the "store" and "review" verbs. (Of course, caching will be used when possible instead of pulling data from the remote db)
1) What should I really store
a) just an API-specific key, that is enough to pull the other object data from the API when reviewing
b) API key + other unique id (like ISBN for books, or name if no other "natural" id exists). My idea behind this is that later it will let me change the used API if I have to.
c) All the object's data (like author,manufacturer,etc.). That is, use the API only for displaying search results
2) If yes to 1 a) or b), how should I organize the Item model? Should I
a) seperate the interface for the API to a seperate class (like RemoteItem) or should I
b) just define methods inside Item, that communicate transparently with the remote site?
c) or a module to include?