• Home
  • API Documentation

Class Message

Message represents a message in a GroupMe Group or Chat.

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

Constructors

| Improve this Doc View Source

Message()

Initializes a new instance of the Message class.

Declaration
public Message()

Properties

| Improve this Doc View Source

Attachments

Gets a list of Attachments attached to this Message.

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

AvatarUrl

Gets the Url of the avatar or profile picture for the Member who sent the message.

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

Chat

Gets the Chat this message belongs to. If this message is a Group Message, this field will be null.

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

ChatId

Gets the conversation identifier for a Chat where this message was sent. This property is ONLY used with with DirectMessageCreateNotification. If this Message represents a Group Message, this field will be null. This property should be the same as ConversationId.

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

ConversationId

Gets the conversation identifier for a Chat where this message was sent. If this Message represents a Group Message, this field will be null.

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

CreatedAtTime

Gets the time when the message was created.

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

CreatedAtUnixTime

Gets the Unix Timestamp when the message was created.

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

FavoritedBy

Gets a list of identifiers for Member who 'liked' this message.

Declaration
public IList<string> FavoritedBy { get; }
Property Value
Type Description
IList<String>
| Improve this Doc View Source

Group

Gets the Group this messages belongs to. If this message is a Direct message, this field will be null.

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

GroupId

Gets the identifier for a Group where this message was sent. If this Message represents a Direct Message, this field will be null.

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

Id

Gets the message identifier.

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

ImageDownloader

Gets the ImageDownloader that can be used to download attachments.

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

Name

Gets the name of the Member who sent the message.

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

Platform

Gets the platform this message was sent from.

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

RecipientId

Gets the identifier for the Member a Direct Message was sent to.

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

SenderType

Gets the type of sender who sent this message.

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

SourceGuid

Gets the GUID assigned by the sender.

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

Text

Gets the message contents.

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

UserId

Gets the identifier for a Member who sent a Group Message.

Declaration
public string UserId { get; }
Property Value
Type Description
String

Methods

| Improve this Doc View Source

AssociateWithChat(Chat)

Associates this Message with a Chat. This will enable API operations on a message that was not retreived directly from a GroupMeClient. Unassociated messages may be loaded or deserialized from a database or other persistant storage.

Declaration
public void AssociateWithChat(Chat chat)
Parameters
Type Name Description
Chat chat

The chat to associate this message with.

| Improve this Doc View Source

AssociateWithGroup(Group)

Associates this Message with a Group. This will enable API operations on a message that was not retreived directly from a GroupMeClient. Unassociated messages may be loaded or deserialized from a database or other persistant storage.

Declaration
public void AssociateWithGroup(Group group)
Parameters
Type Name Description
Group group

The group to associate this message with.

| Improve this Doc View Source

CreateMessage(String, IEnumerable<Attachment>, String, String)

Creates a new Message that can be sent to a Group.

Declaration
public static Message CreateMessage(string body, IEnumerable<Attachment> attachments = null, string guidPrefix = "", string guid = "")
Parameters
Type Name Description
String body

The message contents.

IEnumerable<Attachment> attachments

A list of attachments to be included with the message.

String guidPrefix

An optional prefix to add to the message's GUID.

String guid

The GUID to use for the message. If null or blank, a random GUID will be generated. Any applicable prefixes will be included.

Returns
Type Description
Message

True if successful, false otherwise.

| Improve this Doc View Source

LikeMessage()

Likes this Message.

Declaration
public Task<bool> LikeMessage()
Returns
Type Description
Task<Boolean>

True if successful.

| Improve this Doc View Source

UnlikeMessage()

Unlikes this Message.

Declaration
public Task<bool> UnlikeMessage()
Returns
Type Description
Task<Boolean>

True if successful.

Explicit Interface Implementations

| Improve this Doc View Source

IAvatarSource.ImageOrAvatarUrl

Gets the avatar URL for this IAvatarSource.

Declaration
string IAvatarSource.ImageOrAvatarUrl { get; }
Returns
Type Description
String
| Improve this Doc View Source

IAvatarSource.IsRoundedAvatar

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

Declaration
bool IAvatarSource.IsRoundedAvatar { get; }
Returns
Type Description
Boolean

Implements

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