Can't retrieve events body
amiedes opened this issue · comments
Hi,
First, thanks for developing this gem, it's been very handy! 😄
I'm retrieving some events from a calendar and everything works fine except that I can't retrieve events body (long description). The attribute is there, but it does not have any content.
I'm trying to debug this placing debuggers in several points, like in operation.rb
to examine the received XMLs:
def run
@request = self.class::Request.new(options)
@response = self.class::Response.new(
Exchanger::Client.new.request(@request.body, @request.headers)
)
debugger
# Here if I examine the XML returned by @response.body I can't see the event body anywhere.
@response
end
Some other insights about the @request
object at this point:
(byebug) @request
#<Exchanger::FindItem::Request:0x00007ff6d36d3360 @folder_id="something123", @traversal=:shallow, @base_shape=:all_properties, @email_address=nil, @calendar_view=#<Exchanger::CalendarView start_date: Thu, 25 Jan 2018 11:41:52 +0100, end_date: Wed, 30 Jan 2019 11:41:52 +0100>>
(byebug) @request.body
"<?xml version=\"1.0\"?>\n<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n <soap:Body>\n <FindItem xmlns=\"http://schemas.microsoft.com/exchange/services/2006/messages\" xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\" Traversal=\"Shallow\">\n <ItemShape>\n <t:BaseShape>AllProperties</t:BaseShape>\n </ItemShape>\n <CalendarView StartDate=\"2018-01-25T11:41:52+01:00\" EndDate=\"2019-01-30T11:41:52+01:00\"/>\n <ParentFolderIds>\n <t:FolderId Id=\"something123\"/>\n </ParentFolderIds>\n </FindItem>\n </soap:Body>\n</soap:Envelope>\n"
I've made a quick test with the https://github.com/WinRb/Viewpoint gem and i can see the descriptions there, so the event bodies are there, but I rather not change the gem now.
¿Any clue about how to solve this? ¿Am I missing something?
Any help is really appreciated!
I found a way to get this info, I'm leaving it here just in case it's useful for someone else:
sumarized_events = target_folder.expanded_items(
start_date: sync_range_start,
end_date: sync_range_end
)
complete_events = ::Exchanger::GetItem.run(
item_ids: sumarized_events.map { |i| i.id }
).items