Class: Inbox::Thread
Instance Method Summary
collapse
time_attr_accessor
#==, #as_json, collection_name, #destroy, #inflate, #initialize, #save!, #update, #url
Methods included from Parameters
included, #parameters
Instance Method Details
#archive! ⇒ Object
40
41
42
|
# File 'lib/thread.rb', line 40
def archive!
update_tags!(['archive'], ['inbox'])
end
|
#mark_as_read! ⇒ Object
32
33
34
|
# File 'lib/thread.rb', line 32
def mark_as_read!
update_tags!([], ['unread'])
end
|
#mark_as_seen! ⇒ Object
36
37
38
|
# File 'lib/thread.rb', line 36
def mark_as_seen!
update_tags!([], ['unseen'])
end
|
#star! ⇒ Object
48
49
50
|
# File 'lib/thread.rb', line 48
def star!
update_tags!(['starred'], [''])
end
|
#unarchive! ⇒ Object
44
45
46
|
# File 'lib/thread.rb', line 44
def unarchive!
update_tags!(['inbox'], ['archive'])
end
|
#unstar! ⇒ Object
52
53
54
|
# File 'lib/thread.rb', line 52
def unstar!
update_tags!([], ['starred'])
end
|
25
26
27
28
29
30
|
# File 'lib/thread.rb', line 25
def update_tags!(tags_to_add = [], tags_to_remove = [])
update('PUT', '', {
:add_tags => tags_to_add,
:remove_tags => tags_to_remove
})
end
|