Class: Libis::Services::CollectiveAccess::ItemInfo
- Defined in:
- lib/libis/services/collective_access/item_info.rb
Instance Attribute Summary
Attributes inherited from Connector
Attributes included from SoapClient
Instance Method Summary collapse
- #get_attribute(item, attribute, type = nil) ⇒ Object
- #get_attributes(item, type = nil) ⇒ Object
- #get_items(item_list, bundle, type = nil) ⇒ Object
-
#initialize(host = nil) ⇒ ItemInfo
constructor
A new instance of ItemInfo.
Methods inherited from Connector
#authenticate, #deauthenticate
Methods included from SoapClient
#configure, #operations, #request
Constructor Details
#initialize(host = nil) ⇒ ItemInfo
Returns a new instance of ItemInfo.
11 12 13 |
# File 'lib/libis/services/collective_access/item_info.rb', line 11 def initialize(host = nil) super 'ItemInfo', host end |
Instance Method Details
#get_attribute(item, attribute, type = nil) ⇒ Object
20 21 22 23 |
# File 'lib/libis/services/collective_access/item_info.rb', line 20 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 |
#get_attributes(item, type = nil) ⇒ Object
15 16 17 18 |
# File 'lib/libis/services/collective_access/item_info.rb', line 15 def get_attributes(item, type = nil) type ||= 'ca_objects' request :getAttributes, type: type, item_id: item.to_s end |
#get_items(item_list, bundle, type = nil) ⇒ Object
25 26 27 28 29 30 |
# File 'lib/libis/services/collective_access/item_info.rb', line 25 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 |