Sha256: c8925f0336dcf878aa88a7851162145694a5beda71aecc134bbbc109f4b75974

Contents?: true

Size: 611 Bytes

Versions: 7

Compression:

Stored size: 611 Bytes

Contents

# frozen_string_literal: true

module ChartMogul
  module API
    module Actions
      module All
        def self.included(base)
          base.extend ClassMethods
        end

        module ClassMethods
          def all(options = {})
            resp = handling_errors do
              connection.get(resource_path.apply_with_get_params(options)) do |req|
                req.headers['Content-Type'] = 'application/json'
              end
            end
            json = ChartMogul::Utils::JSONParser.parse(resp.body)
            new_from_json(json)
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
chartmogul-ruby-1.6.8 lib/chartmogul/api/actions/all.rb
chartmogul-ruby-1.6.7 lib/chartmogul/api/actions/all.rb
chartmogul-ruby-1.6.6 lib/chartmogul/api/actions/all.rb
chartmogul-ruby-1.6.4 lib/chartmogul/api/actions/all.rb
chartmogul-ruby-1.6.3 lib/chartmogul/api/actions/all.rb
chartmogul-ruby-1.6.2 lib/chartmogul/api/actions/all.rb
chartmogul-ruby-1.6.1 lib/chartmogul/api/actions/all.rb