Module: Trubl::API::Conversation
- Included in:
- Client
- Defined in:
- lib/trubl/api/conversation.rb
Instance Method Summary collapse
-
#retrieve_conversation(uid) ⇒ Object
implements http://developer.tout.com/api/conversation-api/apimethod/retrieve-conversation returns Trubl::Conversation instance or nil.
-
#retrieve_conversation_participants(uid, order = nil, per_page = nil, page = nil) ⇒ Object
implements http://developer.tout.com/api/conversation-api/apimethod/retrieve-conversation-participants returns Array of Trubl::User instances or nil.
-
#retrieve_conversation_touts(uid, order = nil, per_page = nil, page = nil) ⇒ Object
implements http://developer.tout.com/api/conversation-api/apimethod/retrieve-conversation-touts returns Array of Trubl::Tout instances or nil.
Instance Method Details
#retrieve_conversation(uid) ⇒ Object
implements http://developer.tout.com/api/conversation-api/apimethod/retrieve-conversation returns Trubl::Conversation instance or nil
10 11 12 13 |
# File 'lib/trubl/api/conversation.rb', line 10 def retrieve_conversation(uid) response = get("conversations/#{uid}") Trubl::Conversation.new.from_response(response) end |
#retrieve_conversation_participants(uid, order = nil, per_page = nil, page = nil) ⇒ Object
implements http://developer.tout.com/api/conversation-api/apimethod/retrieve-conversation-participants returns Array of Trubl::User instances or nil
17 18 19 20 |
# File 'lib/trubl/api/conversation.rb', line 17 def retrieve_conversation_participants(uid, order=nil, per_page=nil, page=nil) response = get("conversations/#{uid}/authors", query: {order: order, per_page: per_page, page: page}) Trubl::Users.new.from_response(response) end |
#retrieve_conversation_touts(uid, order = nil, per_page = nil, page = nil) ⇒ Object
implements http://developer.tout.com/api/conversation-api/apimethod/retrieve-conversation-touts returns Array of Trubl::Tout instances or nil
24 25 26 27 |
# File 'lib/trubl/api/conversation.rb', line 24 def retrieve_conversation_touts(uid, order=nil, per_page=nil, page=nil) response = get("conversations/#{uid}/touts", query: {order: order, per_page: per_page, page: page}) Trubl::Touts.new.from_response(response) end |