Imgur / imgurpython

Official Imgur python client library (deprecated)
MIT License
546 stars 116 forks source link

memes_subgallery_image raises ImgurClientError #38

Open augustjanse opened 9 years ago

augustjanse commented 9 years ago

The following snippet reproduces my problem:

client = imgurpython.ImgurClient(client_id, client_secret)
image_id = "1PeJC2R"
print(client.get_image(image_id)) # works fine
print(client.memes_subgallery_image(image_id)) # raises an error

The last call generates this output:

Traceback (most recent call last):
  File "<stdin>", line 5, in <module>
  File "/usr/lib/python3.4/site-packages/imgurpython/client.py", line 476, in memes_subgallery_image
    item = self.make_request('GET', 'g/memes/%s' % item_id)
  File "/usr/lib/python3.4/site-packages/imgurpython/client.py", line 161, in make_request
    raise ImgurClientError(response_data['data']['error'], response.status_code)
imgurpython.helpers.error.ImgurClientError: (400) Invalid Request.

I'm not too sure about Imgur, so excuse me if I'm wrong, but the API seems to use an image ID, so I figured it should be used here as well. Thanks!

augustjanse commented 9 years ago

Apparently, this feature is no longer supported. So this can be considered a sub-issue of the issue that the docs are out of date.

ueg1990 commented 9 years ago

There are two methods related to memes_subgallery: 1) memes_subgallery_image 2) memes_subgallery Are they both to be removed? If yes, I can make the pull request with an update? Or should they both be modified to raise an ImgurClientError with the appropriate message?