Sha256: 74e17d469f2eba01c330aaaed397fc92c600762fccedc41c0f23d26e0dd97d7b

Contents?: true

Size: 902 Bytes

Versions: 31

Compression:

Stored size: 902 Bytes

Contents

# coding: utf-8

require_relative 'connector'

module Libis
  module Services
    module CollectiveAccess

      class ItemInfo < Connector

        def initialize(host = nil)
          super 'ItemInfo', host
        end

        def get_attributes(item, type = nil)
          type ||= 'ca_objects'
          request :getAttributes, type: type, item_id: item.to_s
        end

        def get_attribute(item, attribute, type = nil)
          type ||= 'ca_objects'
          request :getAttributesByElement, type: type, item_id: item.to_s, attribute_code_or_id: attribute.to_s
        end

        def get_items(item_list, bundle, type = nil)
          type ||= 'ca_objects'
          r1, a1 = soap_encode item_list
          r2, a2 = soap_encode bundle
          request :get, type: type, item_ids: r1, bundles: r2, :attributes! => {item_ids: a1, bundles: a2}
        end

      end

    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
libis-services-0.1.11 lib/libis/services/collective_access/item_info.rb
libis-services-0.1.10 lib/libis/services/collective_access/item_info.rb
libis-services-0.1.9 lib/libis/services/collective_access/item_info.rb
libis-services-0.1.7 lib/libis/services/collective_access/item_info.rb
libis-services-0.1.5 lib/libis/services/collective_access/item_info.rb
libis-services-0.1.3 lib/libis/services/collective_access/item_info.rb
libis-services-0.1.2 lib/libis/services/collective_access/item_info.rb
libis-services-0.1.1 lib/libis/services/collective_access/item_info.rb
libis-services-0.1.0-java lib/libis/services/collective_access/item_info.rb
libis-services-0.0.3 lib/libis/services/collective_access/item_info.rb
libis-services-0.0.2 lib/libis/services/collective_access/item_info.rb