Class: The86::Client::Conversation
Instance Attribute Summary
Attributes inherited from Resource
#oauth_token, #parent
Instance Method Summary
collapse
#hide, #unhide
Methods inherited from Resource
#==, accepts_nested_attributes_for, belongs_to, collection_path, #delete!, has_many, has_one, #load, model_name, #patch, path, #persisted?, #resource_path, #save, #sendable_attributes, #to_key, #to_model, #to_param, #url_id
Instance Method Details
#mute(attributes = {}) ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/the86-client/conversation.rb', line 20
def mute(attributes={})
unless attributes[:oauth_token]
raise Error, "Conversations must be hidden by a user"
end
self.oauth_token = attributes[:oauth_token]
connection.post(
path: resource_path << "/mute",
data: sendable_attributes,
status: 200
).data
end
|
32
33
34
35
36
37
38
|
# File 'lib/the86-client/conversation.rb', line 32
def set_metadata(attributes={})
connection.patch(
path: resource_path << "/metadata",
data: attributes,
status: 204
)
end
|