Documentation ¶
Index ¶
- Constants
- type Access
- type Account
- type AttachmentFile
- type Bookmark
- type Client
- type DirectMessage
- type DirectMessageTopic
- type DirectMessages
- type DiscoverLikedPost
- type DoNotDisturb
- type FavoriteTopicWithUnread
- type GetLikesOptions
- type GetMentionListOptions
- type GetMessagesOptions
- type GiveLikedPost
- type Like
- type LikedPost
- type LikesService
- func (s *LikesService) GetLikesDiscover(ctx context.Context, spaceKey string, opt *GetLikesOptions) ([]*DiscoverLikedPost, *shared.Response, error)
- func (s *LikesService) GetLikesGive(ctx context.Context, spaceKey string, opt *GetLikesOptions) ([]*GiveLikedPost, *shared.Response, error)
- func (s *LikesService) GetLikesReceive(ctx context.Context, spaceKey string, opt *GetLikesOptions) ([]*ReceiveLikedPost, *shared.Response, error)
- func (s *LikesService) ReadReceivedLikes(ctx context.Context, spaceKey string, opt *ReadReceivedLikesOptions) (*ReadReceivedLikesResult, *shared.Response, error)
- type Manual
- type Mention
- type MentionsService
- type MessagesService
- func (s *MessagesService) GetDirectMessages(ctx context.Context, spaceKey, accountName string, opt *GetMessagesOptions) (*DirectMessages, *shared.Response, error)
- func (s *MessagesService) GetMyDirectMessageTopics(ctx context.Context, spaceKey string) ([]*DirectMessageTopic, *shared.Response, error)
- func (s *MessagesService) PostDirectMessage(ctx context.Context, spaceKey, accountName, message string, ...) (*PostedMessageResult, *shared.Response, error)
- func (s *MessagesService) SearchMessages(ctx context.Context, spaceKey, q string, opt *SearchMessagesOptions) (*SearchMessagesResult, *shared.Response, error)
- type MyLike
- type MyPlan
- type MySpace
- type NotificationCount
- type NotificationsService
- type Plan
- type Post
- type PostMessageOptions
- type PostedMessageResult
- type ReadNotificationResult
- type ReadReceivedLikesOptions
- type ReadReceivedLikesResult
- type ReceiveLikedPost
- type Scheduled
- type SearchMessagesOptions
- type SearchMessagesResult
- type Space
- type Status
- type Topic
- type TopicsService
- type Unread
Constants ¶
const (
APIVersion = "v2"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttachmentFile ¶
type Client ¶
type Client struct { Topics *TopicsService Likes *LikesService Mentions *MentionsService Notifications *NotificationsService Messages *MessagesService // contains filtered or unexported fields }
func (*Client) SetTypetalkToken ¶
type DirectMessage ¶
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 DoNotDisturb ¶
type FavoriteTopicWithUnread ¶
type GetLikesOptions ¶
type GetLikesOptions struct {
From int `json:"from,omitempty"`
}
type GetMentionListOptions ¶
type GetMessagesOptions ¶
type GiveLikedPost ¶
type GiveLikedPost struct { *ReceiveLikedPost MyLike *MyLike `json:"myLike"` }
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, spaceKey string, opt *GetLikesOptions) ([]*DiscoverLikedPost, *shared.Response, error)
GetLikesDiscover fetches given likes list. Those likes are given by other accounts.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/2/get-likes-discover/
func (*LikesService) GetLikesGive ¶
func (s *LikesService) GetLikesGive(ctx context.Context, spaceKey string, opt *GetLikesOptions) ([]*GiveLikedPost, *shared.Response, error)
GetLikesGive fetches given likes list. Those likes are given by your accounts.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/2/get-likes-give/
func (*LikesService) GetLikesReceive ¶
func (s *LikesService) GetLikesReceive(ctx context.Context, spaceKey string, opt *GetLikesOptions) ([]*ReceiveLikedPost, *shared.Response, error)
GetLikesReceive fetches received likes list.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/2/get-likes-receive/
func (*LikesService) ReadReceivedLikes ¶
func (s *LikesService) ReadReceivedLikes(ctx context.Context, spaceKey string, opt *ReadReceivedLikesOptions) (*ReadReceivedLikesResult, *shared.Response, error)
ReadReceivedLikes marks likes as read.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/2/save-read-likes/
type Manual ¶
type Manual struct {
RemainingTimeInMinutes interface{} `json:"remainingTimeInMinutes"`
}
type MentionsService ¶
type MentionsService service
func (*MentionsService) GetMentionList ¶
func (s *MentionsService) GetMentionList(ctx context.Context, spaceKey string, opt *GetMentionListOptions) ([]*Mention, *shared.Response, error)
GetMentionList fetches mentions list.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/2/get-mentions
type MessagesService ¶
type MessagesService service
func (*MessagesService) GetDirectMessages ¶
func (s *MessagesService) GetDirectMessages(ctx context.Context, spaceKey, accountName string, opt *GetMessagesOptions) (*DirectMessages, *shared.Response, error)
GetDirectMessages fetches direct messages.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/2/get-direct-messages
func (*MessagesService) GetMyDirectMessageTopics ¶
func (s *MessagesService) GetMyDirectMessageTopics(ctx context.Context, spaceKey string) ([]*DirectMessageTopic, *shared.Response, error)
GetMyDirectMessageTopics fetches direct message topics list.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/2/get-dm-topics
func (*MessagesService) PostDirectMessage ¶
func (s *MessagesService) PostDirectMessage(ctx context.Context, spaceKey, accountName, message string, opt *PostMessageOptions) (*PostedMessageResult, *shared.Response, error)
PostDirectMessage posts direct message.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/2/post-direct-message
func (*MessagesService) SearchMessages ¶
func (s *MessagesService) SearchMessages(ctx context.Context, spaceKey, q string, opt *SearchMessagesOptions) (*SearchMessagesResult, *shared.Response, error)
SearchMessages searches messages.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/2/search-messages/
type NotificationCount ¶
type NotificationCount struct { Statuses []*struct { MySpace *MySpace `json:"mySpace"` Space *Space `json:"space"` Access *Access `json:"access"` Like *struct { Receive *struct { HasUnread bool `json:"hasUnread"` ReadLikeID int `json:"readLikeId"` } `json:"receive"` } `json:"like"` DirectMessage *struct { UnreadTopics int `json:"unreadTopics"` } `json:"directMessage"` } `json:"statuses"` DoNotDisturb *DoNotDisturb `json:"doNotDisturb"` }
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/2/get-notification-status
func (*NotificationsService) ReadNotification
deprecated
func (s *NotificationsService) ReadNotification(ctx context.Context) (*ReadNotificationResult, *shared.Response, error)
ReadNotification marks notifications as read.
Deprecated: Use ReadNotification in github.com/nulab/go-typetalk/typetalk/v3
type Post ¶
type Post struct { ID int `json:"id"` TopicID int `json:"topicId"` Topic Topic `json:"topic"` ReplyTo int `json:"replyTo"` Message string `json:"message"` Account Account `json:"account"` Attachments []*AttachmentFile `json:"attachments"` Links []interface{} `json:"links"` DirectMessage *DirectMessage `json:"directMessage"` 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 ReadNotificationResult ¶
type ReadReceivedLikesOptions ¶
type ReadReceivedLikesOptions struct {
LikeID int `json:"likeId,omitempty"`
}
type ReadReceivedLikesResult ¶
type ReceiveLikedPost ¶
type ReceiveLikedPost struct {
*LikedPost
}
type SearchMessagesOptions ¶
type SearchMessagesResult ¶
type Status ¶
type Status struct { Presence *string `json:"presence"` Web interface{} `json:"web"` Mobile interface{} `json:"mobile"` }
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 TopicsService ¶
type TopicsService service
func (*TopicsService) GetMyTopics ¶
func (s *TopicsService) GetMyTopics(ctx context.Context, spaceKey string) ([]*FavoriteTopicWithUnread, *shared.Response, error)
GetMyTopics fetches topics list.
Typetalk API docs: https://developer.nulab-inc.com/docs/typetalk/api/2/get-topics/