Before this API was basically just a wrapper for Python's Requests. Not anymore.
New features:
- TindieOrder and TindieProduct objects to easily access data
- get_orders function to return a list of TindieOrders
- functions to get average shipping cost, revenue, and time between orders
Also these functions will parse the strings into Python objects like datetime or timedelta. Much more useful!
============ RESTART: /home/nuclaer/gitrepos/TindieAPI/tindie.py ============
>>> api = TindieOrdersAPI('[Username]', '[API Key]')
>>> orders = api.get_orders()
>>> for i in orders:
print(i.seller_payout)
[8 order prices]
>>> api.average_order_shipping()
5.6875
>>> api.average_order_shipping(5) # shipping over last 5 orders
6.0
>>>
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.