Sha256: 32c95e6b3e021a269cfea90e39e617be316eefa7742e9b0ea6adccb912fbd90e

Contents?: true

Size: 593 Bytes

Versions: 15

Compression:

Stored size: 593 Bytes

Contents

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

        module ClassMethods
          def retrieve(uuid, options = {})
            resp = handling_errors do
              connection.get("#{resource_path.apply(options)}/#{uuid}") 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

15 entries across 15 versions & 1 rubygems

Version Path
chartmogul-ruby-1.5.1 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-1.5.0 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-1.4.1 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-1.4.0 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-1.3.3 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-1.3.2 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-1.3.1 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-1.3.0 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-1.2.2 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-1.2.1 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-1.2.0 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-1.1.9 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-1.1.8 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-1.1.7 lib/chartmogul/api/actions/retrieve.rb
chartmogul-ruby-1.1.3 lib/chartmogul/api/actions/retrieve.rb