• Home
  • API Documentation

Class Chat

Chat represents a GroupMe Direct Message (or Chat) with another user.

Inheritance
Object
Chat
Implements
IMessageContainer
IAvatarSource
Namespace: GroupMeClientApi.Models
Assembly: GroupMeClientApi.dll
Syntax
public class Chat : object, IMessageContainer, IAvatarSource

Constructors

| Improve this Doc View Source

Chat()

Initializes a new instance of the Chat class.

Declaration
public Chat()
| Improve this Doc View Source

Chat(String)

Initializes a new instance of the Chat class.

Declaration
public Chat(string conversationId)
Parameters
Type Name Description
String conversationId

The conversation ID for this chat.

Properties

| Improve this Doc View Source

Client

Gets the GroupMeClient that manages this Chat.

Declaration
public GroupMeClient Client { get; }
Property Value
Type Description
GroupMeClient
| Improve this Doc View Source

ConversationId

Gets the conversation ID for this chat. The conversation ID identifies both users in the Chat, and matches ConversationId.

Declaration
public string ConversationId { get; }
Property Value
Type Description
String
| Improve this Doc View Source

CreatedAtTime

Gets the Date and Time when this chat was created.

Declaration
public DateTime CreatedAtTime { get; }
Property Value
Type Description
DateTime
| Improve this Doc View Source

CreatedAtUnixTime

Gets the Unix Timestamp for when this chat was created.

Declaration
public int CreatedAtUnixTime { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

Id

Gets the Identifier of this Chat. See OtherUser for more information.

Declaration
public string Id { get; }
Property Value
Type Description
String
| Improve this Doc View Source

ImageOrAvatarUrl

Gets the avatar URL for this IAvatarSource.

Declaration
public string ImageOrAvatarUrl { get; }
Property Value
Type Description
String
| Improve this Doc View Source

IsRoundedAvatar

Gets a value indicating whether the avatar image should be rounded for this IAvatarSource.

Declaration
public bool IsRoundedAvatar { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

LatestMessage

Gets a copy of the latest message for preview purposes. Note that API Operations, like LikeMessage() cannot be performed. See Messages list instead for full message objects.

Declaration
public Message LatestMessage { get; }
Property Value
Type Description
Message
| Improve this Doc View Source

Messages

Gets a list of Messages in this Chat.

Declaration
public List<Message> Messages { get; }
Property Value
Type Description
List<Message>
| Improve this Doc View Source

Name

Gets the name of the Member that this Chat is with. OtherUser

Declaration
public string Name { get; }
Property Value
Type Description
String
| Improve this Doc View Source

OtherUser

Gets the Member that this chat is being held with.

Declaration
public virtual Member OtherUser { get; }
Property Value
Type Description
Member
| Improve this Doc View Source

ReadReceipt

Gets the latest Read Receipt for this collection.

Declaration
public ReadReceipt ReadReceipt { get; }
Property Value
Type Description
ReadReceipt
| Improve this Doc View Source

TotalMessageCount

Gets a copy of the latest message for preview purposes. Note that API Operations, like LikeMessage() cannot be performed. See Messages list instead for full message objects.

Declaration
public int TotalMessageCount { get; }
Property Value
Type Description
Int32
| Improve this Doc View Source

UpdatedAtTime

Gets the Date and Time when this chat was last updated.

Declaration
public DateTime UpdatedAtTime { get; }
Property Value
Type Description
DateTime
| Improve this Doc View Source

UpdatedAtUnixTime

Gets the Unix Timestamp for when this chat was last updated.

Declaration
public int UpdatedAtUnixTime { get; }
Property Value
Type Description
Int32

Methods

| Improve this Doc View Source

AssociateWithClient(GroupMeClient)

Associates this Chat with a GroupMe Client to perform API operations. Chats that are created from sources other than a GroupMeClient, such as from deserialization, are unassociated and not fully functional.

Declaration
public void AssociateWithClient(GroupMeClient client)
Parameters
Type Name Description
GroupMeClient client

The GroupMe Client to associate this Chat with.

| Improve this Doc View Source

GetMaxMessagesAsync(MessageRetreiveMode, String)

Returns a set of messages from a this container in the largest possible block-size.

Declaration
public Task<ICollection<Message>> GetMaxMessagesAsync(MessageRetreiveMode mode = MessageRetreiveMode.None, string messageId = "")
Parameters
Type Name Description
MessageRetreiveMode mode

The method that should be used to determine the set of messages returned.

String messageId

The Message Id that will be used by the sorting mode set in mode.

Returns
Type Description
Task<ICollection<Message>>

A list of Message.

| Improve this Doc View Source

GetMessagesAsync(MessageRetreiveMode, String)

Returns a set of messages from a this Direct Message / Chat.

Declaration
public Task<ICollection<Message>> GetMessagesAsync(MessageRetreiveMode mode = MessageRetreiveMode.None, string messageId = "")
Parameters
Type Name Description
MessageRetreiveMode mode

The method that should be used to determine the set of messages returned.

String messageId

The Message Id that will be used by the sorting mode set in mode.

Returns
Type Description
Task<ICollection<Message>>

A list of Message.

| Improve this Doc View Source

SendMessage(Message)

Sends a message to this Chat.

Declaration
public Task<bool> SendMessage(Message message)
Parameters
Type Name Description
Message message

The message to send.

Returns
Type Description
Task<Boolean>

A indicating the success of the send operation.

| Improve this Doc View Source

SendReadReceipt(Message)

Sends a Read Receipt to this Chat in regards to a specific Message.

Declaration
public Task<bool> SendReadReceipt(Message message)
Parameters
Type Name Description
Message message

The message mark as 'read'.

Returns
Type Description
Task<Boolean>

A indicating the success of the send operation.

| Improve this Doc View Source

WhoAmI()

Returns the authenticated user.

Declaration
public Member WhoAmI()
Returns
Type Description
Member

A Member.

Implements

IMessageContainer
IAvatarSource
  • Edit on GitHub
  • View on GitHub
Back to top Generated by DocFX