Sha256: 6ab3dd3a4d3b94c8be3637d2266f851ffd9a0d89a4a7cb3264b226b8af30c01f

Contents?: true

Size: 1.29 KB

Versions: 21

Compression:

Stored size: 1.29 KB

Contents

module FinApps
  module REST
    module Inventory

      require 'erb'

      class Feeds < FinApps::REST::Resources

        def list
          logger.debug "##{__method__.to_s} => Started"

          end_point = Defaults::END_POINTS[:inventory_feeds_list]
          logger.debug "##{__method__.to_s} => end_point: #{end_point}"

          path = end_point
          logger.debug "##{__method__.to_s} => path: #{path}"

          results, error_messages = @client.send(path, :get)

          logger.debug "##{__method__.to_s} => Completed"
          return results, error_messages
        end

        def show(feed_name)
          logger.debug "##{__method__.to_s} => Started"

          raise MissingArgumentsError.new 'Missing argument: feed_name.' if feed_name.blank?
          logger.debug "##{__method__.to_s} => feed_name: #{feed_name}"

          end_point = Defaults::END_POINTS[:inventory_feed_show]
          logger.debug "##{__method__.to_s} => end_point: #{end_point}"

          path = end_point.sub ':feed_name', ERB::Util.url_encode(feed_name)
          logger.debug "##{__method__.to_s} => path: #{path}"

          results, error_messages = @client.send(path, :get)

          logger.debug "##{__method__.to_s} => Completed"
          return results, error_messages
        end

      end

    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
finapps-0.11.0.pre lib/finapps/rest/inventory/feeds.rb
finapps-0.10.1.pre lib/finapps/rest/inventory/feeds.rb
finapps-0.10.0.pre lib/finapps/rest/inventory/feeds.rb
finapps-0.9.0.pre lib/finapps/rest/inventory/feeds.rb
finapps-0.8.5.pre lib/finapps/rest/inventory/feeds.rb
finapps-0.8.4.pre lib/finapps/rest/inventory/feeds.rb
finapps-0.8.3.pre lib/finapps/rest/inventory/feeds.rb
finapps-0.8.2.pre lib/finapps/rest/inventory/feeds.rb
finapps-0.8.1.pre lib/finapps/rest/inventory/feeds.rb
finapps-0.8.0.pre lib/finapps/rest/inventory/feeds.rb
finapps-0.7.4.pre lib/finapps/rest/inventory/feeds.rb
finapps-0.7.3.pre lib/finapps/rest/inventory/feeds.rb
finapps-0.7.2.pre lib/finapps/rest/inventory/feeds.rb
finapps-0.7.1.pre lib/finapps/rest/inventory/feeds.rb
finapps-0.7.0.pre lib/finapps/rest/inventory/feeds.rb
finapps-0.6.0.pre lib/finapps/rest/inventory/feeds.rb
finapps-0.5.4.pre lib/finapps/rest/inventory/feeds.rb
finapps-0.5.3.pre lib/finapps/rest/inventory/feeds.rb
finapps-0.5.2.pre lib/finapps/rest/inventory/feeds.rb
finapps-0.5.1.pre lib/finapps/rest/inventory/feeds.rb