PyImgur icon indicating copy to clipboard operation
PyImgur copied to clipboard

Add 'data' option

Open lirlocker opened this issue 8 years ago • 1 comments

I added an option to "upload_image" to upload an image by passing the raw data of it. The new 'data' parameter is a string of the image's data.

(I needed this feature because I use this module for web development and I want to be able to upload an image using it's data without saving it anywhere.)

lirlocker avatar Oct 14 '16 20:10 lirlocker

Hi, thanks for the PR. When I run it locally I have 3 test cases failing all in test/init_test.py they are

  • test_update_image
  • test_upload_image
  • test_upload_image_with_args

This will also need a changelog entry and a new test case in test/init_test.py to show that uploading with data works.

I have just pushed a new commit that skips all tests requirering authentication, if no authentication has been configured. So if you've had any problems with that while running the tests locally, then it won't be an issue anymore.

Damgaard avatar Oct 19 '16 22:10 Damgaard