From db9220e77ed4a8a3dfda75c3d809fbe306ffbad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3bert=20Oroszi?= Date: Mon, 8 May 2017 10:55:39 +0200 Subject: [PATCH] fixes #26 Recently instagram introduced the carousel post type, which can contain multiple images. This new type now has been added. --- lib/posts.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/posts.coffee b/lib/posts.coffee index 989c793..10bf27b 100644 --- a/lib/posts.coffee +++ b/lib/posts.coffee @@ -70,6 +70,8 @@ class InstagramPosts extends Readable post.media = rawPost.images['standard_resolution'].url when 'video' post.media = rawPost.videos['standard_resolution'].url + when 'carousel' + post.media = rawPost.carousel_media.map((media) -> media.images['standard_resolution'].url) else throw new Error("Instagram did not return a URL for the media on post #{post.id}")