Skip to content

Commit

Permalink
fixes notslang#26
Browse files Browse the repository at this point in the history
Recently instagram introduced the carousel post type, which can contain multiple images. This new type now has been added.
  • Loading branch information
oroce authored May 8, 2017
1 parent 2b246ad commit db9220e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/posts.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit db9220e

Please sign in to comment.