Class: Panda::Social::InstagramFeedService

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

Constant Summary collapse

GRAPH_API_VERSION =
"v19.0"
GRAPH_API_BASE_URL =
"https://graph.instagram.com/#{GRAPH_API_VERSION}".freeze

Instance Method Summary collapse

Constructor Details

#initialize(access_token) ⇒ InstagramFeedService

Returns a new instance of InstagramFeedService.



12
13
14
# File 'app/services/panda/social/instagram_feed_service.rb', line 12

def initialize(access_token)
  @access_token = access_token
end

Instance Method Details

#sync_recent_postsObject



16
17
18
19
20
# File 'app/services/panda/social/instagram_feed_service.rb', line 16

def sync_recent_posts
  fetch_media.each do |post_data|
    process_post(post_data)
  end
end