MikeBrink / python-picnic-api

Unofficial Python wrapper for the Picnic API.
Apache License 2.0
53 stars 16 forks source link

Add _image_url variable and function get_image_path to get URL of product image #12

Open PatrickLipka opened 3 years ago

PatrickLipka commented 3 years ago

Hi, thank you for providing Python wrappers to the Picnic API! I have added some simple functionality to get product image URLs. Please review it and consider adding it to upstream if you find it useful.

Best regards, Patrick

MikeBrink commented 3 years ago

Hi!

Thanks for your contribution. From your code it seems to me that you are not familiar with some pythonic concepts (e.g. default values, type hinting and string formatting). I also am missing a test for your implementation. The coming 3 weeks I am very busy, but I can take a look at this myself then or can help you if you want :)

PatrickLipka commented 3 years ago

Python definitely isn't my go-to language so I'm happy to get hints for improvement. Of course, I dont want to bother you too much with it. Regarding default values and type hinting I kind of see what you mean and how to improve. When it comes to testing, I'll need to think about it a little bit. Maybe I wil have time to work on it next weekend.

littleyoda commented 3 months ago

So that others do not also have to invest time. The URL for the images has changed.

https://storefront-prod.{contury}.picnicinternational.com/static/images/{imageID}/medium.png