From 4df64b9df738be2b0a0f2ad4769097fccb79370c Mon Sep 17 00:00:00 2001 From: ueg1990 Date: Mon, 19 Oct 2015 17:51:11 -0400 Subject: [PATCH] Add method for Album Image The method for the endpoint Album Image was missing (https://api.imgur.com/3/album/{id}/image/{id}) --- imgurpython/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/imgurpython/client.py b/imgurpython/client.py index 544330b..8528211 100644 --- a/imgurpython/client.py +++ b/imgurpython/client.py @@ -283,6 +283,10 @@ def get_album_images(self, album_id): images = self.make_request('GET', 'album/%s/images' % album_id) return [Image(image) for image in images] + def get_album_image(self, album_id, image_id): + image = self.make_request('GET', 'album/%s/image/%s' % (album_id, image_id)) + return Image(image) + def create_album(self, fields): post_data = {field: fields[field] for field in set(self.allowed_album_fields).intersection(fields.keys())}