module Gmail::Base::Modify
Public Instance Methods
archive()
click to toggle source
# File lib/gmail/base/modify.rb, line 16 def archive modify([], ["INBOX"]) end
archive!()
click to toggle source
# File lib/gmail/base/modify.rb, line 20 def archive! modify!([], ["INBOX"]) end
mark_as_read()
click to toggle source
# File lib/gmail/base/modify.rb, line 48 def mark_as_read modify([],["UNREAD"] ) end
mark_as_read!()
click to toggle source
# File lib/gmail/base/modify.rb, line 52 def mark_as_read! modify!([],["UNREAD"] ) end
mark_as_unread()
click to toggle source
# File lib/gmail/base/modify.rb, line 56 def mark_as_unread modify(["UNREAD"],[] ) end
mark_as_unread!()
click to toggle source
# File lib/gmail/base/modify.rb, line 60 def mark_as_unread! modify!(["UNREAD"],[] ) end
modify(addLabelIds=[], removeLabelIds=[])
click to toggle source
# File lib/gmail/base/modify.rb, line 11 def modify(addLabelIds=[], removeLabelIds=[]) response = Gmail.request(self.class.base_method.send("modify"),{id: id}, {addLabelIds: addLabelIds, removeLabelIds: removeLabelIds}) d = Util.convert_to_gmail_object(response, self.class.class_name.downcase) end
modify!(addLabelIds=[], removeLabelIds=[])
click to toggle source
# File lib/gmail/base/modify.rb, line 4 def modify!(addLabelIds=[], removeLabelIds=[]) response = Gmail.request(self.class.base_method.send("modify"),{id: id}, {addLabelIds: addLabelIds, removeLabelIds: removeLabelIds}) d = Util.convert_to_gmail_object(response, self.class.class_name.downcase) @values = d.values self end
star()
click to toggle source
# File lib/gmail/base/modify.rb, line 32 def star modify(["STARRED"], [] ) end
star!()
click to toggle source
# File lib/gmail/base/modify.rb, line 36 def star! modify!(["STARRED"], [] ) end
unarchive()
click to toggle source
# File lib/gmail/base/modify.rb, line 24 def unarchive modify(["INBOX"], [] ) end
unarchive!()
click to toggle source
# File lib/gmail/base/modify.rb, line 28 def unarchive! modify!(["INBOX"], [] ) end
unstar()
click to toggle source
# File lib/gmail/base/modify.rb, line 40 def unstar modify([],["STARRED"] ) end
unstar!()
click to toggle source
# File lib/gmail/base/modify.rb, line 44 def unstar! modify!([],["STARRED"] ) end