viewpoint 0.1.10 → 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/model/item.rb +4 -3
  2. metadata +3 -3
data/lib/model/item.rb CHANGED
@@ -31,11 +31,12 @@ module Viewpoint
31
31
  # This is a class method that fetches an existing Item from the
32
32
  # Exchange Store.
33
33
  # @param [String] item_id The id of the item.
34
+ # @param [Symbol] shape The optional shape of the item :id_only/:default/:all_properties
34
35
  # @return [Item] Returns an Item or subclass of Item
35
36
  # @todo Add support to fetch an item with a ChangeKey
36
- def self.get_item(item_id)
37
- conn = Viewpoint::EWS::EWS.instance
38
- resp = conn.ews.get_item([item_id])
37
+ def self.get_item(item_id, shape = :default)
38
+ item_shape = {:base_shape => shape.to_s.camelcase}
39
+ resp = (Viewpoint::EWS::EWS.instance).ews.get_item([item_id], item_shape)
39
40
  resp = resp.items.shift
40
41
  resp_type = resp.keys.first
41
42
  eval "#{resp_type.to_s.camel_case}.new(resp[resp_type])"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 10
9
- version: 0.1.10
8
+ - 11
9
+ version: 0.1.11
10
10
  platform: ruby
11
11
  authors:
12
12
  - Dan Wanek
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-16 00:00:00 -06:00
17
+ date: 2010-12-27 00:00:00 -06:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency