-
A more useful and unique API
08/28/2019 at 22:16 • 0 commentsBefore 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 >>>
-
Now getting data about orders from Tindie!
08/27/2019 at 22:44 • 0 commentsThis was pretty simple and easy. Just used requests and a simple class to provide API access.
You'll notice, however, it's not just a list of orders. There's also this meta part, which has some miscellaneous that I didn't find docs on or uses for.
In each order though, there is a ton of data. Even data for features Tindie doesn't support yet - like preordering. Interesting!!! I certainly hope they support that soon.
Anyway, if you are interested in more I highly suggest playing with the API. There doesn't seem to be much docs on this, but it certainly works.