Sha256: 30429d04a065547f23ca29f66b371605b6c5d4c323407c82fdc886c7ddd89beb

Contents?: true

Size: 678 Bytes

Versions: 37

Compression:

Stored size: 678 Bytes

Contents

module Adminpanel
  module Analytics
    module InstagramAnalytics
      extend ActiveSupport::Concern

      included do
        before_action :set_instagram_token, only:[:instagram, :instagram_comment]
      end

      def instagram_comment
        response = @instagram_client.create_media_comment params[:id], params[:instagram_text]
        redirect_to instagram_analytics_path
      end

    private
      def set_instagram_token
        @instagram_token = Auth.find_by_key 'instagram'

        if !@instagram_token.nil?
          @instagram_client ||= Instagram.client(
            access_token: @instagram_token.value
          )
        end
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
adminpanel-3.6.1 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb
adminpanel-3.6.0 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb
adminpanel-3.5.1 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb
adminpanel-3.5.0 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb
adminpanel-3.4.7 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb
adminpanel-3.4.6 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb
adminpanel-3.4.5 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb
adminpanel-3.4.4 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb
adminpanel-3.4.3 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb
adminpanel-3.4.2 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb
adminpanel-3.4.1 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb
adminpanel-3.4.0 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb
adminpanel-3.3.4 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb
adminpanel-3.3.3 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb
adminpanel-3.3.0 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb
adminpanel-3.2.1 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb
adminpanel-3.2.0 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb
adminpanel-3.1.0 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb
adminpanel-3.0.0 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb
adminpanel-2.6.1 app/controllers/concerns/adminpanel/analytics/instagram_analytics.rb