DO NOT COMMIT THE SDK!

media_module not testet

#Test
Test with Books
Test with Films
Test with other stuff
Test when we add 10+ asisn on a page, see filter

Localized words when checking for contributors. Currently works only if you use english amazon
In Other Languages words are localized like Director is Regisseur in german and so on.
Solved by removing the filter, use all

####TABLE CHANGES: deleted db fields @see update hook
publisher removed
ediutorial review removed
studio and manufacturer are merged in new api. Removed Studio
label merged with brand, so removed. label removed
dripa table: amazon_item_editorial_review

why is asin a custom field? it would make much more sense to use a core field as asin is just a string nothing special? would mek update to d8 easier? yes/no?

IMPLEMENT Requestcounter! ->done implement disable checkbox

NEVER EVER empty the amazon_item table completely. Throtteling will fuck you up and break all your links. generating this data can only be done over time!

wenn wir eine seite aufrufen die mehrere felder anzeigt. z.B eien liste, dann erzeugt er sehr viele solo requests auf einmal -> throttel ban
beispiele:
/funkkopfhoerer-test
/funkkopfhoerer-empfehlungen

Currently the update occurs also if the timestamp is due. Problem is on some pages taht can trigger 10 Requests per second. Especially if you list 10 productfields in a view.
thats why the timestamp criteria was removed fromn amazon_item_lookup_from_db()
like you delete the db and run a crawler ovr the whole page then only nodes trigegr a request

the amazon_convert_to_asin makes too many requests in the filter and therefore must be dropped too. done

INVALID ASINS will cause throttle errors on pages because invalid asins will give no reuslt and therefore can not be cache. if the filter is called 4 times, because of contribs and stuff, 2 invalid asins
on a page will cause request hammering 2x4=8 in around one second. no idea how to fix taht, fix the asins!
General problem with the filter. The function is called once for every token. On the first run we do a batch lookup with up to 10 asins to cache them with 1 request!
Otherwise it would cause 10 single requests


macht es sinn eine liste mit inhalten/nodes anzulegen die asin date anthalten und die dann an likchecker zu geben um das zu generieren?

_amazon_clean_type removed because it seems that this CATEGORY type is no longer avaliable

Remove this autocomplete nonsense from the fields. Why...amazon searcxh is way better. That is no real speed advantage. Only Hammers api and problem is one request per second currently



rename ASIN module to amazon_field



variable are still called amazon_ not amazon_pa_


Cache update logic
--------------------
Currently every item did get saved into amazon_item if the page is called. Cron the updates the values in amazon_items.
Problem with that is, that old asins still reside in that table and often lead to invalid_asin of prodcuts we dont even have in any field no more.

1.) We need a button to clean the amazon_item table from items that are not used in any field at all?



#THROTTELING. new api
#Request per second problem
MORE THAN 1 ASIN request per second will....no twork..throttle. It may rise if you have more sales but at the beginnin git is like taht
api seems more sensible for many requests: resulted in a `429 Too Many Requests`
the old module had filters and looped over these ASISN one per run. meaning too many requests per second
sometimes i get a random ban even when i only submit like one asin using the asin field....just resend. error is not found ASIN fpr locale DE

problem with filter/tokens and an amazon field. that fires one reuqest for the field and one for the tokens(if < 10). that is too fast insta ban
implement wait sleep ->admi nsetting
timeout php beachten!!!

more than 5 limit on chron gives me.....throttel

using tokens in a node body raises risk of throtteling. i have tested it with up to 10 tokens. maximum bundle for 1 request is 10.

DOC: https://docs.aws.amazon.com/de_de/AWSECommerceService/latest/DG/TroubleshootingApplications.html
"Effective 23-Jan-2019, the usage limit for each account is calculated based on revenue performance attributed to calls (also called requests) to the Product Advertising API (PA API) during your account’s latest 30-day trailing period."

#What worked here when NEW
-cron 5 items
-save page with amazon field and 4 tokens ok

Also see this on token bucket: https://forums.aws.amazon.com/thread.jspa?messageID=805840

opk nach 3 tagen funktioniert das cron nu nauch mit 10 items und einem 10 sekunden delay
es sieht so aus als ob sich das ädnert wenn man sales generiert

todo old doc links


autocomplete triggers searches too fast, we need to confirm the search with enter! no auto!
it is impossible to realize an autocomplete like that. only a search by button
search function is implemented...but not used currently because autocomplete impossible
removed some old feeds hook implementations. feeds what for?

Views
----------
integration needs some work because some values might not be avaliable no more
names
especially with media handling, participants and stuff.




