Class: Podio::ConversationEvent
Overview
Instance Attribute Summary
#attributes
Class Method Summary
collapse
#==, #[], #[]=, #api_friendly_ref_type, #as_json, collection, delegate_to_hash, has_many, has_one, #hash, #initialize, #initialize_attributes, klass_from_string, list, member, #new_record?, output_attribute_as_json, #parent_model, #persisted?, property, #to_param
Class Method Details
.add_participants(conversation_id, participants) ⇒ Object
21
22
23
24
25
26
27
|
# File 'lib/podio/models/conversation_event.rb', line 21
def add_participants(conversation_id, participants)
response = Podio.connection.post do |req|
req.url "/conversation/#{conversation_id}/participant/v2/"
req.body = { :participants => participants }
end
list response.body
end
|
.change_subject(conversation_id, subject) ⇒ Object
42
43
44
45
46
47
48
49
|
# File 'lib/podio/models/conversation_event.rb', line 42
def change_subject(conversation_id, subject)
response = Podio.connection.put do |req|
req.url "/conversation/#{conversation_id}/subject"
req.body = { :subject => subject }
end
member response.body
end
|
.create_reply(conversation_id, text, file_ids = [], embed_id = nil, embed_file_id = nil) ⇒ Object
29
30
31
32
33
34
35
|
# File 'lib/podio/models/conversation_event.rb', line 29
def create_reply(conversation_id, text, file_ids=[], embed_id=nil, embed_file_id=nil)
response = Podio.connection.post do |req|
req.url "/conversation/#{conversation_id}/reply/v2"
req.body = {:text => text, :file_ids => file_ids, :embed_id => embed_id, :embed_file_id => embed_file_id}
end
member response.body
end
|
.find(id) ⇒ Object
38
39
40
|
# File 'lib/podio/models/conversation_event.rb', line 38
def find(id)
member Podio.connection.get("/conversation/event/#{id}").body
end
|
.find_all(conversation_id, options = {}) ⇒ Object
15
16
17
18
19
|
# File 'lib/podio/models/conversation_event.rb', line 15
def find_all(conversation_id, options = {})
list Podio.connection.get { |req|
req.url("/conversation/#{conversation_id}/event/", options)
}.body
end
|