Package com.podio.conversation
Class ConversationAPI
- java.lang.Object
-
- com.podio.BaseAPI
-
- com.podio.conversation.ConversationAPI
-
public class ConversationAPI extends BaseAPI
-
-
Constructor Summary
Constructors Constructor Description ConversationAPI(ResourceFactory resourceFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intaddReply(int conversationId, String text)Creates a reply to the conversation.intcreateConversation(String subject, String text, List<Integer> participants)Creates a new conversation with a list of users.intcreateConversation(String subject, String text, List<Integer> participants, Reference reference)Creates a new conversation with a list of users.ConversationgetConversation(int conversationId)Gets the conversation including participants and messages with the the given id.List<Conversation>getConversationsOnObject(Reference object)Returns a list of all the conversations on the object that the active user is part of.-
Methods inherited from class com.podio.BaseAPI
getResourceFactory
-
-
-
-
Constructor Detail
-
ConversationAPI
public ConversationAPI(ResourceFactory resourceFactory)
-
-
Method Detail
-
createConversation
public int createConversation(String subject, String text, List<Integer> participants)
Creates a new conversation with a list of users. Once a conversation is started, the participants cannot (yet) be changed.- Parameters:
subject- The subject of the conversationtext- The text of the first message in the conversationparticipants- List of participants in the conversation (not including the sender)- Returns:
- The id of the newly created conversation
-
createConversation
public int createConversation(String subject, String text, List<Integer> participants, Reference reference)
Creates a new conversation with a list of users. Once a conversation is started, the participants cannot (yet) be changed.- Parameters:
subject- The subject of the conversationtext- The text of the first message in the conversationparticipants- List of participants in the conversation (not including the sender)reference- The object the conversation should be created on, if any- Returns:
- The id of the newly created conversation
-
getConversation
public Conversation getConversation(int conversationId)
Gets the conversation including participants and messages with the the given id. Only participants in the conversation is allowed to view the conversation.- Parameters:
conversationId- The id of the conversation to get- Returns:
- The conversation requested
-
getConversationsOnObject
public List<Conversation> getConversationsOnObject(Reference object)
Returns a list of all the conversations on the object that the active user is part of.- Parameters:
object- The object to get conversations on- Returns:
- The list of conversations
-
addReply
public int addReply(int conversationId, String text)Creates a reply to the conversation.- Parameters:
conversationId- The id of the conversation to reply totext- The text of the reply- Returns:
- The id of the new message
-
-