Versions in this module Expand all Collapse all v0 v0.3.0 Feb 14, 2024 Changes in this version + const GroupMeImageBase + const PictureEncodingJPEG + const PictureEncodingPNG + func HTTPHandlerFunc(callbacks ...HTTPMessageCallback) http.HandlerFunc + func HTTPStatusText(code int) string + func ValidID(id string) bool + type BotClient struct + func NewBotClient(botID string, options ...ClientOption) *BotClient + func (c *BotClient) Close() error + func (c *BotClient) PostBotMessage(ctx context.Context, text string, pictureURL *string) error type Client + func (c *Client) UploadPicture(ctx context.Context, img image.Image, encoding PictureEncoding) (PictureURL, error) + type ClientOption func(client *client) + func WithHTTPClient(httpClient *http.Client) ClientOption + type HTTPMessageCallback func(Message) + type PictureEncoding string + type PictureURL struct + Avatar string + Base string + Large string + Preview string v0.2.0 Jan 22, 2021 Changes in this version + const ChangeOwnerBadGroupOrOwner + const ChangeOwnerBadRequest + const ChangeOwnerNotOwner + const ChangeOwnerOk + const ChangeOwnerRequesterNewOwner + const PeriodDay + const PeriodMonth + const PeriodWeek + const SenderTypeBot + const SenderTypeSystem + const SenderTypeUser type HTTPStatusCode + const HTTPBadGateway + const HTTPBadRequest + const HTTPCreated + const HTTPEnhanceYourCalm + const HTTPForbidden + const HTTPInternalServerError + const HTTPNoContent + const HTTPNotFound + const HTTPNotModified + const HTTPOk + const HTTPServiceUnavailable + const HTTPUnauthorized v0.1.5 Dec 15, 2020 Changes in this version type Member + Email string + PhoneNumber string v0.1.4 Aug 29, 2020 v0.1.3 Aug 25, 2020 v0.1.2 Aug 24, 2020 v0.1.1 Aug 23, 2020 v0.1.0 Jul 31, 2020 Changes in this version + const GroupMeAPIBase + const Period_Day + const Period_Month + const Period_Week + type Attachment struct + Charmap [][]int + Latitude string + Loci [][]int + Longitude string + Name string + Placeholder string + Type AttachmentType + URL string + UserIDs []ID + func (a Attachment) String() string + type AttachmentType string + const Emoji + const Image + const Location + const Mentions + 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 ChangeOwnerStatusCode string + const ChangeOwner_BadGroupOrOwner + const ChangeOwner_BadRequest + const ChangeOwner_NotOwner + const ChangeOwner_Ok + const ChangeOwner_RequesterNewOwner + func (c ChangeOwnerStatusCode) 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(groupID ID, members ...*Member) (string, error) + func (c *Client) AddMembersResults(groupID ID, resultID string) ([]*Member, error) + func (c *Client) BlockBetween(userID, otherUserID ID) (bool, error) + func (c *Client) ChangeGroupOwner(reqs ChangeOwnerRequest) (ChangeOwnerResult, error) + func (c *Client) Close() error + func (c *Client) CreateBlock(userID, otherUserID ID) (*Block, error) + func (c *Client) CreateBot(bot *Bot) (*Bot, error) + func (c *Client) CreateDirectMessage(m *Message) (*Message, error) + func (c *Client) CreateGroup(gs GroupSettings) (*Group, error) + func (c *Client) CreateLike(conversationID, messageID ID) error + func (c *Client) CreateMessage(groupID ID, m *Message) (*Message, error) + func (c *Client) CreateSMSMode(duration int, registrationID *ID) error + func (c *Client) DeleteSMSMode() error + func (c *Client) DestroyBot(botID ID) error + func (c *Client) DestroyGroup(groupID ID) error + func (c *Client) DestroyLike(conversationID, messageID ID) error + func (c *Client) FormerGroups() ([]*Group, error) + func (c *Client) IndexBlock(userID ID) ([]*Block, error) + func (c *Client) IndexBots() ([]*Bot, error) + func (c *Client) IndexChats(req *IndexChatsQuery) ([]*Chat, error) + func (c *Client) IndexDirectMessages(otherUserID ID, req *IndexDirectMessagesQuery) (IndexDirectMessagesResponse, error) + func (c *Client) IndexGroups(req *GroupsQuery) ([]*Group, error) + func (c *Client) IndexLeaderboard(groupID ID, p period) ([]*Message, error) + func (c *Client) IndexMessages(groupID ID, req *IndexMessagesQuery) (IndexMessagesResponse, error) + func (c *Client) JoinGroup(groupID ID, shareToken string) (*Group, error) + func (c *Client) MyHitsLeaderboard(groupID ID) ([]*Message, error) + func (c *Client) MyLikesLeaderboard(groupID ID) ([]*Message, error) + func (c *Client) MyUser() (*User, error) + func (c *Client) PostBotMessage(botID ID, text string, pictureURL *string) error + func (c *Client) RejoinGroup(groupID ID) (*Group, error) + func (c *Client) RemoveMember(groupID, membershipID ID) error + func (c *Client) ShowGroup(groupID ID) (*Group, error) + func (c *Client) Unblock(userID, otherUserID ID) error + func (c *Client) UpdateGroup(groupID ID, gs GroupSettings) (*Group, error) + func (c *Client) UpdateMember(groupID ID, nickname string) (*Member, error) + func (c *Client) UpdateMyUser(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 HTTP_BadGateway + const HTTP_BadRequest + const HTTP_Created + const HTTP_EnhanceYourCalm + const HTTP_Forbidden + const HTTP_InternalServerError + const HTTP_NoContent + const HTTP_NotFound + const HTTP_NotModified + const HTTP_Ok + const HTTP_ServiceUnavailable + const HTTP_Unauthorized + func (c HTTPStatusCode) String() string + 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 + GUID string + ID ID + ImageURL string + Muted bool + Nickname string + UserID ID + func (m Member) String() string + type Message struct + Attachments []*Attachment + AvatarURL string + BotID 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 SenderType string + const SenderType_Bot + const SenderType_System + const SenderType_User + 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