• Home
  • API Documentation

Class Group

Represents a GroupMe Group Chat.

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

Constructors

| Improve this Doc View Source

Group()

Initializes a new instance of the Group class.

Declaration
public Group()

Properties

| Improve this Doc View Source

Client

Gets the GroupMeClient that manages this Group.

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

CreatedAtTime

Gets the time when the group was created.

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

CreatedAtUnixTime

Gets the Unix Timestamp when the group was created.

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

Description

Gets the group description text.

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

Id

Gets the group identifier.

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

ImageUrl

Gets the Url for the Group avatar or image.

Declaration
public string ImageUrl { get; }
Property Value
Type Description
String
| 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. This is the same data as MsgPreview, packaged in a Message object.

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

MaxMembers

Gets the maximum number of members who can be in this group.

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

Members

Gets a list of Members in the group.

Declaration
public virtual ICollection<Member> Members { get; }
Property Value
Type Description
ICollection<Member>
| Improve this Doc View Source

Messages

Gets a list of Messages in this Group.

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

MsgPreview

Gets a preview of the messages in this group.

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

MutedUntilTime

Gets the time when the group will be unmuted. If the group is not muted, this will return Unix epoch.

Declaration
public DateTime MutedUntilTime { get; }
Property Value
Type Description
DateTime
Remarks

GroupMe returns 253402300800 for an infinite mute, which is out-of-range for Unix timestamps. Hence the -1 workaround.

| Improve this Doc View Source

MutedUntilUnixTime

Gets a value indicating the time when the group will be unmuted, in Unix format.

Declaration
public long? MutedUntilUnixTime { get; }
Property Value
Type Description
Nullable<Int64>
| Improve this Doc View Source

Name

Gets the group name.

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

OfficeMode

Gets a value indicating whether the group is in office mode.

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

PhoneNumber

Gets the phone number that can be used to interact with this group over SMS.

Declaration
public string PhoneNumber { get; }
Property Value
Type Description
String
| 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

ShareUrl

Gets a Url to share the group.

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

TotalMessageCount

Gets the total number of messages within this IMessageContainer.

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

Type

Gets the group type.

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

UpdatedAtTime

Gets the time when the group was last updated.

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

UpdatedAtUnixTime

Gets the Unix Timestamp when the group was last updated.

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

Methods

| Improve this Doc View Source

AssociateWithClient(GroupMeClient)

Associates this Group with a GroupMe Client to perform API operations. Groups 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 Group 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 Group 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

GetMessagesAsync(Int32, MessageRetreiveMode, String)

Returns a set of messages from a this Group Chat.

Declaration
public Task<ICollection<Message>> GetMessagesAsync(int limit, MessageRetreiveMode mode, string messageId)
Parameters
Type Name Description
Int32 limit

Number of messages that should be returned. GroupMe allows a range of 20 to 100 messages at a time.

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

MuteGroup(Nullable<Int32>)

Mutes this Group.

Declaration
public Task<bool> MuteGroup(int? durationMinutes)
Parameters
Type Name Description
Nullable<Int32> durationMinutes

The duration the group should be muted for, expressed in minutes. To mute the group indefinitely, specify a duration of null.

Returns
Type Description
Task<Boolean>

A indicating the success of the change operation.

| Improve this Doc View Source

SendMessage(Message)

Sends a new message to this Group.

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

UnMuteGroup()

Unmutes this Group.

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

A indicating the success of the change operation.

| Improve this Doc View Source

UpdateGroupAvatar(Byte[])

Updates the avatar for the this Group.

Declaration
public Task<bool> UpdateGroupAvatar(byte[] imageData)
Parameters
Type Name Description
Byte[] imageData

The new avatar image, as raw bytes. If null, the avatar will be set to the generic image.

Returns
Type Description
Task<Boolean>

A indicating the success of the change operation.

| Improve this Doc View Source

UpdateGroupDescription(String)

Updates the description of this Group.

Declaration
public Task<bool> UpdateGroupDescription(string description)
Parameters
Type Name Description
String description

The new description.

Returns
Type Description
Task<Boolean>

A indicating the success of the change operation.

| Improve this Doc View Source

UpdateGroupName(String)

Updates the name of this Group.

Declaration
public Task<bool> UpdateGroupName(string name)
Parameters
Type Name Description
String name

The new group name.

Returns
Type Description
Task<Boolean>

A indicating the success of the change operation.

| Improve this Doc View Source

UpdateMemberAvatar(Byte[])

Updates the avatar for the current Member. This change applies only to the current Group.

Declaration
public Task<bool> UpdateMemberAvatar(byte[] imageData)
Parameters
Type Name Description
Byte[] imageData

The new avatar image, as raw bytes. If null, the Member's global avatar will be used.

Returns
Type Description
Task<Boolean>

A indicating the success of the change operation.

| Improve this Doc View Source

UpdateNickname(String)

Updates the nickname for the current Member. This change applies only to the current Group.

Declaration
public Task<bool> UpdateNickname(string name)
Parameters
Type Name Description
String name

The new nickname.

Returns
Type Description
Task<Boolean>

A indicating the success of the change operation.

| Improve this Doc View Source

WhoAmI()

Returns the authenticated user.

Declaration
public Member WhoAmI()
Returns
Type Description
Member

A Member.

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

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