Documentation ¶
Index ¶
- Constants
- type Access
- type Account
- type AccountStatus
- type AccountsService
- func (s *AccountsService) GetFriendProfile(ctx context.Context, accountName string) (*Profile, *shared.Response, error)
- func (s *AccountsService) GetMyFriends(ctx context.Context, opt *GetMyFriendsOptions) (*Friends, *shared.Response, error)deprecated
- func (s *AccountsService) GetMyProfile(ctx context.Context) (*MyProfile, *shared.Response, error)
- func (s *AccountsService) GetOnlineStatus(ctx context.Context, accountIds ...int) (*OnlineStatus, *shared.Response, error)
- func (s *AccountsService) SearchAccounts(ctx context.Context, nameOrEmailAddress string) (*Account, *shared.Response, error)deprecated
- type AttachmentFile
- type Bookmark
- type Client
- type CreateTalkOptions
- type CreateTopicOptions
- type CreatedTalkResult
- type DeletedTalkResult
- type DirectMessage
- type DirectMessageTopic
- type DirectMessages
- type DiscoverLikedPost
- type FavoriteTopic
- type FavoriteTopicWithUnread
- type FilesService
- type Friends
- type GetLikesOptions
- type GetMentionListOptions
- type GetMessagesOptions
- type GetMyFriendsOptions
- type GetTopicMessagesOptions
- type GiveLikedPost
- type Group
- type Invites
- type Like
- type LikedMessageResult
- type LikedPost
- type LikesService
- func (s *LikesService) GetLikesDiscover(ctx context.Context, opt *GetLikesOptions) ([]*DiscoverLikedPost, *shared.Response, error)
- func (s *LikesService) GetLikesGive(ctx context.Context, opt *GetLikesOptions) ([]*GiveLikedPost, *shared.Response, error)
- func (s *LikesService) GetLikesReceive(ctx context.Context, opt *GetLikesOptions) ([]*ReceiveLikedPost, *shared.Response, error)
- func (s *LikesService) ReadReceivedLikes(ctx context.Context, likeID int) (*ReadReceivedLikesResult, *shared.Response, error)
- type Mention
- type MentionsService
- type Message
- type MessagesInTalk
- type MessagesService
- func (s *MessagesService) DeleteMessage(ctx context.Context, topicID, postID int) (*Post, *shared.Response, error)
- func (s *MessagesService) GetDirectMessages(ctx context.Context, accountName string, opt *GetMessagesOptions) (*DirectMessages, *shared.Response, error)deprecated
- func (s *MessagesService) GetMessage(ctx context.Context, topicID, postID int) (*Message, *shared.Response, error)
- func (s *MessagesService) GetMyDirectMessageTopics(ctx context.Context) ([]*DirectMessageTopic, *shared.Response, error)deprecated
- func (s *MessagesService) LikeMessage(ctx context.Context, topicID, postID int) (*LikedMessageResult, *shared.Response, error)
- func (s *MessagesService) PostDirectMessage(ctx context.Context, accountName, message string, opt *PostMessageOptions) (*PostedMessageResult, *shared.Response, error)deprecated
- func (s *MessagesService) PostMessage(ctx context.Context, topicID int, message string, opt *PostMessageOptions) (*PostedMessageResult, *shared.Response, error)
- func (s *MessagesService) UnlikeMessage(ctx context.Context, topicID, postID int) (*Like, *shared.Response, error)
- func (s *MessagesService) UpdateMessage(ctx context.Context, topicID, postID int, message string) (*UpdatedMessageResult, *shared.Response, error)
- type MyLike
- type MyPlan
- type MyProfile
- type NotificationCount
- type NotificationList
- type NotificationsService
- func (s *NotificationsService) GetNotificationCount(ctx context.Context) (*NotificationCount, *shared.Response, error)
- func (s *NotificationsService) GetNotificationList(ctx context.Context) (*NotificationList, *shared.Response, error)
- func (s *NotificationsService) ReadNotification(ctx context.Context) (*Access, *shared.Response, error)deprecated
- type OnlineStatus
- type Organization
- type OrganizationMembers
- type OrganizationsService
- type Plan
- type Post
- type PostMessageOptions
- type PostedMessageResult
- type Profile
- type ReadReceivedLikesResult
- type ReceiveLikedPost
- type RemovedMessagesResult
- type Space
- type Status
- type Talk
- type TalksService
- func (s *TalksService) AddMessagesToTalk(ctx context.Context, topicID, talkID int, postIds ...int) (*MessagesInTalk, *shared.Response, error)
- func (s *TalksService) CreateTalk(ctx context.Context, topicID int, talkName string, postIds ...int) (*CreatedTalkResult, *shared.Response, error)
- func (s *TalksService) DeleteTalk(ctx context.Context, topicID, talkID int) (*DeletedTalkResult, *shared.Response, error)
- func (s *TalksService) GetMessagesInTalk(ctx context.Context, topicID, talkID int, opt *GetMessagesOptions) (*MessagesInTalk, *shared.Response, error)
- func (s *TalksService) GetTalkList(ctx context.Context, topicID int) ([]*Talk, *shared.Response, error)
- func (s *TalksService) RemoveMessagesFromTalk(ctx context.Context, topicID, talkID int, postIds ...int) (*RemovedMessagesResult, *shared.Response, error)
- func (s *TalksService) UpdateTalk(ctx context.Context, topicID, talkID int, talkName string) (*UpdatedTalkResult, *shared.Response, error)
- type Topic
- type TopicDetails
- type TopicMessages
- type TopicsService
- func (s *TopicsService) CreateTopic(ctx context.Context, opt *CreateTopicOptions) (*TopicDetails, *shared.Response, error)
- func (s *TopicsService) DeleteTopic(ctx context.Context, topicID int) (*Topic, *shared.Response, error)
- func (s *TopicsService) FavoriteTopic(ctx context.Context, topicID int) (*FavoriteTopic, *shared.Response, error)
- func (s *TopicsService) GetMyTopics(ctx context.Context) ([]*FavoriteTopicWithUnread, *shared.Response, error)
- func (s *TopicsService) GetTopicDetails(ctx context.Context, topicID int) (*TopicDetails, *shared.Response, error)
- func (s *TopicsService) GetTopicMessages(ctx context.Context, topicID int, opt *GetTopicMessagesOptions) (*TopicMessages, *shared.Response, error)
- func (s *TopicsService) ReadMessagesInTopic(ctx context.Context, topicID, postID int) (*Unread, *shared.Response, error)
- func (s *TopicsService) UnfavoriteTopic(ctx context.Context, topicID int) (*FavoriteTopic, *shared.Response, error)
- func (s *TopicsService) UpdateTopic(ctx context.Context, topicID int, opt *UpdateTopicOptions) (*TopicDetails, *shared.Response, error)
- func (s *TopicsService) UpdateTopicMembers(ctx context.Context, topicID int, opt *UpdateTopicMembersOptions) (*TopicDetails, *shared.Response, error)
- type Unread
- type UpdateTopicMembersOptions
- type UpdateTopicOptions
- type UpdatedMessageResult
- type UpdatedTalkResult
Constants ¶
const (
APIVersion = "v1"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { ID int `json:"id"` Name string `json:"name"` FullName string `json:"fullName"` Suggestion string `json:"suggestion"` ImageURL string `json:"imageUrl"` IsBot bool `json:"isBot"` Lang string `json:"lang"` TimezoneID string `json:"timezoneId"` CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` ImageUpdatedAt *time.Time `json:"imageUpdatedAt"` }
Account represents Typetalk account information.
type AccountStatus ¶
AccountStatus contains account and status information.
type AccountsService ¶
type AccountsService service
AccountsService handles communication with the account related API.
func (*AccountsService) GetFriendProfile ¶
func (s *AccountsService) GetFriendProfile(ctx context.Context, accountName string) (*Profile, *shared.Response, error)
GetFriendProfile fetches other user's account information.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/get-friend-profile
func (*AccountsService) GetMyFriends
deprecated
func (s *AccountsService) GetMyFriends(ctx context.Context, opt *GetMyFriendsOptions) (*Friends, *shared.Response, error)
GetMyFriends searches other user who belong to a topic in common.
Deprecated: Use GetMyFrieands in github.com/nulab/go-typetalk/typetalk/v4
func (*AccountsService) GetMyProfile ¶
GetMyProfile fetches the user's account information.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/get-profile
func (*AccountsService) GetOnlineStatus ¶
func (s *AccountsService) GetOnlineStatus(ctx context.Context, accountIds ...int) (*OnlineStatus, *shared.Response, error)
GetOnlineStatus fetches an user's online status.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/get-online-status
func (*AccountsService) SearchAccounts
deprecated
type AttachmentFile ¶
type Client ¶
type Client struct { Accounts *AccountsService Files *FilesService Mentions *MentionsService Messages *MessagesService Notifications *NotificationsService Organizations *OrganizationsService Talks *TalksService Topics *TopicsService Likes *LikesService // contains filtered or unexported fields }
func (*Client) SetTypetalkToken ¶
type CreateTalkOptions ¶
type CreateTopicOptions ¶
type CreatedTalkResult ¶
type DeletedTalkResult ¶
type DeletedTalkResult CreatedTalkResult
type DirectMessage ¶
type DirectMessage AccountStatus
type DirectMessageTopic ¶
type DirectMessageTopic struct { Topic *Topic `json:"topic"` Unread *Unread `json:"unread"` DirectMessage *DirectMessage `json:"directMessage"` }
type DirectMessages ¶
type DirectMessages struct { Topic *Topic `json:"topic"` DirectMessage *DirectMessage `json:"directMessage"` Bookmark *Bookmark `json:"bookmark"` Posts []*Post `json:"posts"` HasNext bool `json:"hasNext"` }
type DiscoverLikedPost ¶
type DiscoverLikedPost struct {
*LikedPost
}
type FavoriteTopic ¶
type FavoriteTopicWithUnread ¶
type FavoriteTopicWithUnread struct { FavoriteTopic Unread Unread `json:"unread"` }
type FilesService ¶
type FilesService service
func (*FilesService) DownloadAttachmentFile ¶
func (s *FilesService) DownloadAttachmentFile(ctx context.Context, topicID, postID, attachmentID int, filename string) (io.ReadCloser, error)
DownloadAttachmentFile downloads attachment file.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/download-attachment
func (*FilesService) UploadAttachmentFile ¶
func (s *FilesService) UploadAttachmentFile(ctx context.Context, topicID int, file *os.File) (*AttachmentFile, *shared.Response, error)
UploadAttachmentFile uploads attachment file.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/upload-attachment
type Friends ¶
type Friends struct { Count int `json:"count"` Accounts []*AccountStatus `json:"accounts"` }
Friends represents accounts search result.
type GetLikesOptions ¶
type GetLikesOptions struct {
From int `json:"from,omitempty"`
}
type GetMentionListOptions ¶
type GetMessagesOptions ¶
type GetMyFriendsOptions ¶
type GetMyFriendsOptions struct { Q string `json:"q,omitempty"` Offset int `json:"offset,omitempty"` Count int `json:"count,omitempty"` }
GetMyFriendsOptions represents request parameters for "search/friends" API.
type GetTopicMessagesOptions ¶
type GiveLikedPost ¶
type GiveLikedPost struct { *ReceiveLikedPost MyLike *MyLike `json:"myLike"` }
type Invites ¶
type Invites struct { Teams []interface{} `json:"teams"` Topics []*Topic `json:"topics"` }
type LikedMessageResult ¶
type LikedMessageResult struct { Like *Like `json:"like"` Post *Post `json:"post"` Topic *Topic `json:"topic"` DirectMessage *DirectMessage `json:"directMessage"` }
type LikedPost ¶
type LikedPost struct { Post *Post `json:"post"` Likes []*Like `json:"likes"` DirectMessage *DirectMessage `json:"directMessage"` }
type LikesService ¶
type LikesService service
func (*LikesService) GetLikesDiscover ¶
func (s *LikesService) GetLikesDiscover(ctx context.Context, opt *GetLikesOptions) ([]*DiscoverLikedPost, *shared.Response, error)
GetLikesDiscover fetches given likes list. Those likes are given by all the accounts.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/get-likes-discover/
func (*LikesService) GetLikesGive ¶
func (s *LikesService) GetLikesGive(ctx context.Context, opt *GetLikesOptions) ([]*GiveLikedPost, *shared.Response, error)
GetLikesGive fetches given likes list. Those likes are given by your account.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/get-likes-give/
func (*LikesService) GetLikesReceive ¶
func (s *LikesService) GetLikesReceive(ctx context.Context, opt *GetLikesOptions) ([]*ReceiveLikedPost, *shared.Response, error)
GetLikesReceive fetches received likes list.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/get-likes-receive/
func (*LikesService) ReadReceivedLikes ¶
func (s *LikesService) ReadReceivedLikes(ctx context.Context, likeID int) (*ReadReceivedLikesResult, *shared.Response, error)
ReadReceivedLikes marks likes as read.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/save-read-likes/
type MentionsService ¶
type MentionsService service
func (*MentionsService) GetMentionList ¶
func (s *MentionsService) GetMentionList(ctx context.Context, opt *GetMentionListOptions) ([]*Mention, *shared.Response, error)
GetMentionList fetches mentions list.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/get-mentions
func (*MentionsService) ReadMention ¶
func (s *MentionsService) ReadMention(ctx context.Context, mentionID int) (*Mention, *shared.Response, error)
ReadMention marks a mention as read.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/save-read-mention
type Message ¶
type Message struct { MySpace *Organization `json:"mySpace"` Team interface{} `json:"team"` Topic *Topic `json:"topic"` Post *Post `json:"post"` Replies []*Post `json:"replies"` ExceedsAttachmentLimit bool `json:"exceedsAttachmentLimit"` }
type MessagesInTalk ¶
type MessagesInTalk struct { MySpace *Organization `json:"mySpace"` Topic *Topic `json:"topic"` DirectMessage *DirectMessage `json:"directMessage"` Talk *Talk `json:"talk"` Posts []*Post `json:"posts"` HasNext bool `json:"hasNext"` }
type MessagesService ¶
type MessagesService service
func (*MessagesService) DeleteMessage ¶
func (s *MessagesService) DeleteMessage(ctx context.Context, topicID, postID int) (*Post, *shared.Response, error)
DeleteMessage deletes a message.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/delete-message
func (*MessagesService) GetDirectMessages
deprecated
func (s *MessagesService) GetDirectMessages(ctx context.Context, accountName string, opt *GetMessagesOptions) (*DirectMessages, *shared.Response, error)
GetDirectMessages fetches direct messages list.
Deprecated: Use GetDirectMessages in github.com/nulab/go-typetalk/typetalk/v2
func (*MessagesService) GetMessage ¶
func (s *MessagesService) GetMessage(ctx context.Context, topicID, postID int) (*Message, *shared.Response, error)
GetMessage gets a message.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/get-message
func (*MessagesService) GetMyDirectMessageTopics
deprecated
func (s *MessagesService) GetMyDirectMessageTopics(ctx context.Context) ([]*DirectMessageTopic, *shared.Response, error)
GetMyDirectMessageTopics fetches direct message topics list.
Deprecated: Use GetMyDirectMessageTopics in github.com/nulab/go-typetalk/typetalk/v2
func (*MessagesService) LikeMessage ¶
func (s *MessagesService) LikeMessage(ctx context.Context, topicID, postID int) (*LikedMessageResult, *shared.Response, error)
LikeMessage marks a message as liked.
Typetalk API docs: https://developer.nulab-inc.com/ja/docs/typetalk/api/1/favorite-topic
func (*MessagesService) PostDirectMessage
deprecated
func (s *MessagesService) PostDirectMessage(ctx context.Context, accountName, message string, opt *PostMessageOptions) (*PostedMessageResult, *shared.Response, error)
PostDirectMessage posts direct message.
Deprecated: Use PostDirectMessage in github.com/nulab/go-typetalk/typetalk/v2
func (*MessagesService) PostMessage ¶
func (s *MessagesService) PostMessage(ctx context.Context, topicID int, message string, opt *PostMessageOptions) (*PostedMessageResult, *shared.Response, error)
PostMessage posts a message.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/post-message
func (*MessagesService) UnlikeMessage ¶
func (s *MessagesService) UnlikeMessage(ctx context.Context, topicID, postID int) (*Like, *shared.Response, error)
UnlikeMessage marks a message as unliked.
Typetalk API docs: https://developer.nulab-inc.com/ja/docs/typetalk/api/1/unfavorite-topic
func (*MessagesService) UpdateMessage ¶
func (s *MessagesService) UpdateMessage(ctx context.Context, topicID, postID int, message string) (*UpdatedMessageResult, *shared.Response, error)
UpdateMessage updates a message.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/update-message
type MyProfile ¶
type MyProfile struct { Account *Account `json:"account"` Lang string `json:"lang"` Theme string `json:"theme"` Post *struct { UseCtrl bool `json:"useCtrl"` EmojiSkinTone string `json:"emojiSkinTone"` } `json:"post"` }
MyProfile represents the user's information.
type NotificationCount ¶
type NotificationCount struct { Mention *struct { Unread int `json:"unread"` } `json:"mention"` Access *Access `json:"access"` Invite *struct { Team *struct { Pending int `json:"pending"` } `json:"team"` Topic *struct { Pending int `json:"pending"` } `json:"topic"` } `json:"invite"` Like *struct { Receive interface{} `json:"receive"` } `json:"like"` DirectMessage *struct { UnreadTopics int `json:"unreadTopics"` } `json:"directMessage"` }
type NotificationList ¶
type NotificationsService ¶
type NotificationsService service
func (*NotificationsService) GetNotificationCount ¶
func (s *NotificationsService) GetNotificationCount(ctx context.Context) (*NotificationCount, *shared.Response, error)
GetNotificationCount fetches notification counts.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/get-notification-status
func (*NotificationsService) GetNotificationList ¶
func (s *NotificationsService) GetNotificationList(ctx context.Context) (*NotificationList, *shared.Response, error)
GetNotificationList fetches notifications list.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/get-notifications
func (*NotificationsService) ReadNotification
deprecated
type OnlineStatus ¶
type OnlineStatus struct {
Accounts []*AccountStatus `json:"accounts"`
}
OnlineStatus contains accounts information.
type Organization ¶
type OrganizationMembers ¶
type OrganizationsService ¶
type OrganizationsService service
func (*OrganizationsService) GetMyOrganizations ¶
func (s *OrganizationsService) GetMyOrganizations(ctx context.Context, excludesGuest bool) ([]*Organization, *shared.Response, error)
GetMyOrganizations fetches organizations list.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/get-spaces
func (*OrganizationsService) GetOrganizationMembers ¶
func (s *OrganizationsService) GetOrganizationMembers(ctx context.Context, spaceKey string) (*OrganizationMembers, *shared.Response, error)
GetOrganizationMembers fetches an organization's members list.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/get-space-members
type Post ¶
type Post struct { ID int `json:"id"` TopicID int `json:"topicId"` ReplyTo int `json:"replyTo"` Message string `json:"message"` Account *Account `json:"account"` Mention *Mention `json:"mention"` Attachments []*AttachmentFile `json:"attachments"` Likes []*Like `json:"likes"` Talks []*Talk `json:"talks"` Links []interface{} `json:"links"` CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` }
type PostMessageOptions ¶
type PostMessageOptions struct { ReplyTo int `json:"replyTo,omitempty"` ShowLinkMeta bool `json:"showLinkMeta,omitempty"` FileKeys []string `json:"fileKeys[%d],omitempty"` TalkIds []int `json:"talkIds[%d],omitempty"` FileUrls []string `json:"attachments[%d].fileUrl,omitempty"` FileNames []string `json:"attachments[%d].fileName,omitempty"` }
type PostedMessageResult ¶
type ReadReceivedLikesResult ¶
type ReceiveLikedPost ¶
type ReceiveLikedPost struct {
*LikedPost
}
type RemovedMessagesResult ¶
type RemovedMessagesResult CreatedTalkResult
type Status ¶
type Status struct { Presence *string `json:"presence"` Web interface{} `json:"web"` Mobile interface{} `json:"mobile"` }
Status represents online status of the user.
type TalksService ¶
type TalksService service
func (*TalksService) AddMessagesToTalk ¶
func (s *TalksService) AddMessagesToTalk(ctx context.Context, topicID, talkID int, postIds ...int) (*MessagesInTalk, *shared.Response, error)
AddMessagesToTalk adds messages to a talk.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/add-message-to-talk
func (*TalksService) CreateTalk ¶
func (s *TalksService) CreateTalk(ctx context.Context, topicID int, talkName string, postIds ...int) (*CreatedTalkResult, *shared.Response, error)
CreateTalk creates a talk.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/create-talk
func (*TalksService) DeleteTalk ¶
func (s *TalksService) DeleteTalk(ctx context.Context, topicID, talkID int) (*DeletedTalkResult, *shared.Response, error)
DeleteTalk deletes a talk.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/delete-talk
func (*TalksService) GetMessagesInTalk ¶
func (s *TalksService) GetMessagesInTalk(ctx context.Context, topicID, talkID int, opt *GetMessagesOptions) (*MessagesInTalk, *shared.Response, error)
GetMessagesInTalk fetches messages list in a talk.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/get-talk
func (*TalksService) GetTalkList ¶
func (s *TalksService) GetTalkList(ctx context.Context, topicID int) ([]*Talk, *shared.Response, error)
GetTalkList fetches talks list.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/get-talks
func (*TalksService) RemoveMessagesFromTalk ¶
func (s *TalksService) RemoveMessagesFromTalk(ctx context.Context, topicID, talkID int, postIds ...int) (*RemovedMessagesResult, *shared.Response, error)
RemoveMessagesFromTalk removes messages from a talk.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/remove-message-from-talk
func (*TalksService) UpdateTalk ¶
func (s *TalksService) UpdateTalk(ctx context.Context, topicID, talkID int, talkName string) (*UpdatedTalkResult, *shared.Response, error)
UpdateTalk updates a talk.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/update-talk
type Topic ¶
type Topic struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` Suggestion string `json:"suggestion"` IsDirectMessage bool `json:"isDirectMessage"` LastPostedAt *time.Time `json:"lastPostedAt"` CreatedAt *time.Time `json:"createdAt"` UpdatedAt *time.Time `json:"updatedAt"` }
type TopicDetails ¶
type TopicDetails struct { Topic *Topic `json:"topic"` MySpace *Organization `json:"mySpace"` Teams []interface{} `json:"teams"` Groups []*struct { Group *Group `json:"group"` MemberCount int `json:"memberCount"` } `json:"groups"` Accounts []*Account `json:"accounts"` InvitingAccounts []interface{} `json:"invitingAccounts"` Invites []interface{} `json:"invites"` AccountsForAPI []interface{} `json:"accountsForApi"` Integrations []interface{} `json:"integrations"` RemainingInvitations interface{} `json:"remainingInvitations"` }
type TopicMessages ¶
type TopicsService ¶
type TopicsService service
func (*TopicsService) CreateTopic ¶
func (s *TopicsService) CreateTopic(ctx context.Context, opt *CreateTopicOptions) (*TopicDetails, *shared.Response, error)
CreateTopic creates a topic.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/create-topic
func (*TopicsService) DeleteTopic ¶
func (s *TopicsService) DeleteTopic(ctx context.Context, topicID int) (*Topic, *shared.Response, error)
DeleteTopic deletes a topic.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/delete-topic
func (*TopicsService) FavoriteTopic ¶
func (s *TopicsService) FavoriteTopic(ctx context.Context, topicID int) (*FavoriteTopic, *shared.Response, error)
FavoriteTopic marks a topic as favorite.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/favorite-topic
func (*TopicsService) GetMyTopics ¶
func (s *TopicsService) GetMyTopics(ctx context.Context) ([]*FavoriteTopicWithUnread, *shared.Response, error)
GetMyTopics fetches topics list.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/get-topics
func (*TopicsService) GetTopicDetails ¶
func (s *TopicsService) GetTopicDetails(ctx context.Context, topicID int) (*TopicDetails, *shared.Response, error)
GetTopicDetails fetches a topic's detailed information.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/get-topic-details
func (*TopicsService) GetTopicMessages ¶
func (s *TopicsService) GetTopicMessages(ctx context.Context, topicID int, opt *GetTopicMessagesOptions) (*TopicMessages, *shared.Response, error)
GetTopicMessages fetches messages list in a topic.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/get-messages
func (*TopicsService) ReadMessagesInTopic ¶
func (s *TopicsService) ReadMessagesInTopic(ctx context.Context, topicID, postID int) (*Unread, *shared.Response, error)
ReadMessagesInTopic mark a message as read.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/save-read-topic
func (*TopicsService) UnfavoriteTopic ¶
func (s *TopicsService) UnfavoriteTopic(ctx context.Context, topicID int) (*FavoriteTopic, *shared.Response, error)
UnfavoriteTopic marks a topic as unfavorite.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/unfavorite-topic
func (*TopicsService) UpdateTopic ¶
func (s *TopicsService) UpdateTopic(ctx context.Context, topicID int, opt *UpdateTopicOptions) (*TopicDetails, *shared.Response, error)
UpdateTopic updates a topic.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/update-topic
func (*TopicsService) UpdateTopicMembers ¶
func (s *TopicsService) UpdateTopicMembers(ctx context.Context, topicID int, opt *UpdateTopicMembersOptions) (*TopicDetails, *shared.Response, error)
UpdateTopicMembers updates members in a topic.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/1/update-topic-members
type UpdateTopicMembersOptions ¶
type UpdateTopicMembersOptions struct { AddAccountIds []int `json:"addAccountIds[%d],omitempty"` AddGroupIds []int `json:"addGroupIds[%d],omitempty"` InvitationsEmail []string `json:"invitations[%d].email,omitempty"` InvitationsRole []string `json:"invitations[%d].role,omitempty"` RemoveAccountsID []int `json:"removeAccounts[%d].id,omitempty"` RemoveAccountsCancelSpaceInvitation []bool `json:"removeAccounts[%d].cancelSpaceInvitation,omitempty"` RemoveGroupIds []bool `json:"removeGroupIds[%d],omitempty"` }
type UpdateTopicOptions ¶
type UpdatedMessageResult ¶
type UpdatedMessageResult PostedMessageResult