lib/namespace.rb in inbox-0.17.2 vs lib/namespace.rb in inbox-0.17.3

- old
+ new

@@ -5,10 +5,11 @@ require 'draft' require 'contact' require 'file' require 'calendar' require 'event' +require 'folder' require 'yajl' require 'em-http' require 'ostruct' # Rather than saying require 'thread', we need to explicitly force @@ -60,10 +61,18 @@ def events @events ||= RestfulModelCollection.new(Event, @_api, @id) end + def folders + @folders ||= RestfulModelCollection.new(Folder, @_api, @id) + end + + def labels + @labels ||= RestfulModelCollection.new(Label, @_api, @id) + end + def get_cursor(timestamp) # Get the cursor corresponding to a specific timestamp. path = @_api.url_for_path("/n/#{@namespace_id}/delta/generate_cursor") data = { :start => timestamp } @@ -86,9 +95,11 @@ "event" => Inbox::Event, "file" => Inbox::File, "message" => Inbox::Message, "namespace" => Inbox::Namespace, "tag" => Inbox::Tag, + "folder" => Inbox::Folder, + "label" => Inbox::Label, } def _build_exclude_types(exclude_types) exclude_string = "&exclude_types="