Versions in this module Expand all Collapse all v0 v0.3.7 Sep 25, 2023 v0.3.6 Sep 24, 2023 v0.3.5 Sep 22, 2023 v0.3.4 Sep 21, 2023 v0.3.3 Sep 20, 2023 v0.3.2 Sep 20, 2023 v0.3.1 Sep 19, 2023 v0.3.0 Sep 19, 2023 Changes in this version + const ChangeOwnerBadGroupOrOwner + const ChangeOwnerBadRequest + const ChangeOwnerNotOwner + const ChangeOwnerOk + const ChangeOwnerRequesterNewOwner + const Emoji + const GroupMeAPIBase + const Image + const Location + const Mentions + const PeriodDay + const PeriodMonth + const PeriodWeek + const PushServer + const SenderTypeBot + const SenderTypeSystem + const SenderTypeUser + var ErrHandlerNotFound = errors.New("Handler not found") + var ErrListenerNotStarted = errors.New("GroupMe listener not started") + var RealTimeHandlers map[string]func(r *PushSubscription, channel string, data ...interface{}) + var RealTimeSystemHandlers map[string]func(r *PushSubscription, channel string, id ID, rawData []byte) + type Attachment struct + Charmap [][]int + FileID string + Latitude string + Loci [][]int + Longitude string + Name string + Placeholder string + ReplyID ID + Type attachmentType + URL string + UserIDs []ID + VideoPreviewURL string + func (a *Attachment) String() string + type Block struct + BlockedUserID ID + CreatedAT Timestamp + UserID ID + func (b Block) String() string + type Bot struct + AvatarURL string + BotID ID + CallbackURL string + DMNotification bool + GroupID ID + Name string + func (b *Bot) String() string + type ChangeOwnerRequest struct + GroupID string + OwnerID string + func (r ChangeOwnerRequest) String() string + type ChangeOwnerResult struct + GroupID string + OwnerID string + Status changeOwnerStatusCode + func (r ChangeOwnerResult) String() string + type Chat struct + CreatedAt Timestamp + LastMessage *Message + MessagesCount int + OtherUser User + UpdatedAt Timestamp + func (c *Chat) String() string + type Client struct + func NewClient(authToken string) *Client + func (c *Client) AddMembers(ctx context.Context, groupID ID, members ...*Member) (string, error) + func (c *Client) AddMembersResults(ctx context.Context, groupID ID, resultID string) ([]*Member, error) + func (c *Client) BlockBetween(ctx context.Context, userID, otherUserID string) (bool, error) + func (c *Client) ChangeGroupOwner(ctx context.Context, reqs ChangeOwnerRequest) (ChangeOwnerResult, error) + func (c *Client) Close() error + func (c *Client) CreateBlock(ctx context.Context, userID, otherUserID string) (*Block, error) + func (c *Client) CreateBot(ctx context.Context, bot *Bot) (*Bot, error) + func (c *Client) CreateDirectMessage(ctx context.Context, m *Message) (*Message, error) + func (c *Client) CreateGroup(ctx context.Context, gs GroupSettings) (*Group, error) + func (c *Client) CreateLike(ctx context.Context, conversationID, messageID ID) error + func (c *Client) CreateMessage(ctx context.Context, groupID ID, m *Message) (*Message, error) + func (c *Client) CreateSMSMode(ctx context.Context, duration int, registrationID *ID) error + func (c *Client) DeleteSMSMode(ctx context.Context) error + func (c *Client) DestroyBot(ctx context.Context, botID ID) error + func (c *Client) DestroyGroup(ctx context.Context, groupID ID) error + func (c *Client) DestroyLike(ctx context.Context, conversationID, messageID ID) error + func (c *Client) FormerGroups(ctx context.Context) ([]*Group, error) + func (c *Client) IndexBlock(ctx context.Context, userID string) ([]*Block, error) + func (c *Client) IndexBots(ctx context.Context) ([]*Bot, error) + func (c *Client) IndexChats(ctx context.Context, req *IndexChatsQuery) ([]*Chat, error) + func (c *Client) IndexDirectMessages(ctx context.Context, otherUserID string, req *IndexDirectMessagesQuery) (IndexDirectMessagesResponse, error) + func (c *Client) IndexGroups(ctx context.Context, req *GroupsQuery) ([]*Group, error) + func (c *Client) IndexLeaderboard(ctx context.Context, groupID ID, p period) ([]*Message, error) + func (c *Client) IndexMessages(ctx context.Context, groupID ID, req *IndexMessagesQuery) (IndexMessagesResponse, error) + func (c *Client) IndexRelations(ctx context.Context) ([]*User, error) + func (c *Client) JoinGroup(ctx context.Context, groupID ID, shareToken string) (*Group, error) + func (c *Client) MyHitsLeaderboard(ctx context.Context, groupID ID) ([]*Message, error) + func (c *Client) MyLikesLeaderboard(ctx context.Context, groupID ID) ([]*Message, error) + func (c *Client) MyUser(ctx context.Context) (*User, error) + func (c *Client) PostBotMessage(ctx context.Context, botID ID, text string, pictureURL *string) error + func (c *Client) RejoinGroup(ctx context.Context, groupID ID) (*Group, error) + func (c *Client) RemoveMember(ctx context.Context, groupID, membershipID ID) error + func (c *Client) ShowGroup(ctx context.Context, groupID ID) (*Group, error) + func (c *Client) Unblock(ctx context.Context, userID, otherUserID string) error + func (c *Client) UpdateGroup(ctx context.Context, groupID ID, gs GroupSettings) (*Group, error) + func (c *Client) UpdateMember(ctx context.Context, groupID ID, nickname string) (*Member, error) + func (c *Client) UpdateMyUser(ctx context.Context, us UserSettings) (*User, error) + func (c Client) String() string + type Group struct + CreatedAt Timestamp + CreatorUserID ID + Description string + ID ID + ImageURL string + Members []*Member + Messages GroupMessages + Name string + ShareURL string + Type string + UpdatedAt Timestamp + func (g *Group) GetMemberByNickname(nickname string) *Member + func (g *Group) GetMemberByUserID(userID ID) *Member + func (g *Group) String() string + type GroupMessages struct + Count uint + LastMessageCreatedAt Timestamp + LastMessageID ID + Preview MessagePreview + type GroupSettings struct + Description string + ImageURL string + Name string + OfficeMode bool + Share bool + func (gss GroupSettings) String() string + type GroupsQuery struct + Omit string + Page int + PerPage int + func (q GroupsQuery) String() string + type HTTPStatusCode int + const HTTPBadGateway + const HTTPBadRequest + const HTTPCreated + const HTTPEnhanceYourCalm + const HTTPForbidden + const HTTPInternalServerError + const HTTPNoContent + const HTTPNotFound + const HTTPNotModified + const HTTPOk + const HTTPServiceUnavailable + const HTTPUnauthorized + func (c HTTPStatusCode) String() string + type HandleGroupAvatar interface + HandleGroupAvatar func(group ID, newAvatar string) + type HandleGroupLikeIcon interface + HandleLikeIcon func(group ID, PackID, PackIndex int, Type string) + type HandleGroupName interface + HandleGroupName func(group ID, newName string) + type HandleGroupTopic interface + HandleGroupTopic func(group ID, newTopic string) + type HandleMemberNewAvatar interface + HandleNewAvatarInGroup func(group ID, user ID, avatarURL string) + type HandleMemberNewNickname interface + HandleNewNickname func(group ID, user ID, newName string) + type HandleMembers interface + HandleMembers func(group ID, members []Member, added bool) + type Handler interface + HandleError func(error) + type HandlerAll interface + type HandlerLike interface + HandleLike func(Message) + type HandlerMembership interface + HandleJoin func(ID) + type HandlerText interface + HandleTextMessage func(Message) + type ID string + func (id ID) String() string + func (id ID) Valid() bool + type IndexChatsQuery struct + Page int + PerPage int + type IndexDirectMessagesQuery struct + BeforeID ID + SinceID ID + func (q IndexDirectMessagesQuery) String() string + type IndexDirectMessagesResponse struct + Count int + Messages []*Message + func (r IndexDirectMessagesResponse) String() string + type IndexMessagesQuery struct + AfterID ID + BeforeID ID + Limit int + SinceID ID + func (q IndexMessagesQuery) String() string + type IndexMessagesResponse struct + Count int + Messages []*Message + func (r IndexMessagesResponse) String() string + type Member struct + AppInstalled bool + AutoKicked bool + Email string + GUID string + ID ID + ImageURL string + Muted bool + Nickname string + PhoneNumber string + UserID ID + func (m *Member) String() string + type Message struct + Attachments []*Attachment + AvatarURL string + BotID ID + ChatID ID + ConversationID ID + CreatedAt Timestamp + FavoritedBy []string + GroupID ID + ID ID + ImageURL string + Name string + RecipientID ID + SenderID ID + SenderType senderType + SourceGUID string + System bool + Text string + UserID ID + func (m *Message) String() string + type MessagePreview struct + Attachments []*Attachment + ImageURL string + Nickname string + Text string + type Meta struct + Code HTTPStatusCode + Errors []string + func (m Meta) Error() string + type PhoneNumber string + func (pn PhoneNumber) String() string + func (pn PhoneNumber) Valid() bool + type PushSubscription struct + LastConnected int64 + func NewPushSubscription(context context.Context) PushSubscription + func (r *PushSubscription) AddFullHandler(h HandlerAll) + func (r *PushSubscription) AddHandler(h Handler) + func (r *PushSubscription) Connect(context context.Context, authorizationToken string) error + func (r *PushSubscription) Connected() bool + func (r *PushSubscription) SubscribeToDM(context context.Context, id ID) error + func (r *PushSubscription) SubscribeToGroup(context context.Context, id ID) error + func (r *PushSubscription) SubscribeToUser(context context.Context, id ID) error + type Timestamp uint64 + func FromTime(t time.Time) Timestamp + func (t Timestamp) String() string + func (t Timestamp) ToTime() time.Time + type User struct + AvatarURL string + CreatedAt Timestamp + Email string + ID ID + ImageURL string + Name string + PhoneNumber PhoneNumber + SMS bool + UpdatedAt Timestamp + func (u *User) String() string + type UserSettings struct + AvatarURL string + Email string + Name string + ZipCode string