Skip to content

Commit

Permalink
Added example
Browse files Browse the repository at this point in the history
  • Loading branch information
sergioteula committed Jul 13, 2021
1 parent 74fddca commit ccde267
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions examples/example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
from amazon_paapi import AmazonApi
import secrets


amazon = AmazonApi(secrets.KEY, secrets.SECRET, secrets.TAG, secrets.COUNTRY, throttling=2)


print('\nGet items')
print('=========================================================')
product = amazon.get_items('B01N5IB20Q')
print(product[0].item_info.title.display_value)


print('Search items')
print('=========================================================')
items = amazon.search_items(keywords='nintendo', item_count=3)
for item in items.items:
print(item.item_info.title.display_value)


print('\nGet variations')
print('=========================================================')
items = amazon.get_variations('B08F63PPNV', variation_count=3)
for item in items.items:
print(item.item_info.title.display_value)


print('\nGet nodes')
print('=========================================================')
items = amazon.get_browse_nodes(['667049031']) # Only available in spanish marketplace
for item in items:
print(item.display_name)

0 comments on commit ccde267

Please sign in to comment.