Class: InstagramFeedService

Inherits:
Object
  • Object
show all
Defined in:
app/services/instagram_feed_service.rb

Instance Method Summary collapse

Constructor Details

#initializeInstagramFeedService

Returns a new instance of InstagramFeedService.



3
4
5
# File 'app/services/instagram_feed_service.rb', line 3

def initialize
  @client = Instagram.client
end

Instance Method Details

#get_feed_for_tag(tag) ⇒ Object



7
8
9
10
11
# File 'app/services/instagram_feed_service.rb', line 7

def get_feed_for_tag(tag)
  @client.tag_recent_media(tag).map do |post|
    Social::InstagramPostPresenter.from_instagram_post(post)
  end
end