v5

package
v3.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIVersion = "v5"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Access

type Access struct {
	Unopened          int `json:"unopened"`
	UnopenedExcludeDM int `json:"unopenedExcludeDM"`
}

type Client

type Client struct {
	Notifications *NotificationsService
	// contains filtered or unexported fields
}

func NewClient

func NewClient(httpClient *http.Client) *Client

func (*Client) SetTypetalkToken

func (c *Client) SetTypetalkToken(token string) *Client

type DoNotDisturb

type DoNotDisturb struct {
	IsSuppressed bool       `json:"isSuppressed"`
	Manual       *Manual    `json:"manual"`
	Scheduled    *Scheduled `json:"scheduled"`
}

type Manual

type Manual struct {
	RemainingTimeInMinutes interface{} `json:"remainingTimeInMinutes"`
}

type MyPlan

type MyPlan struct {
	Plan                     *Plan       `json:"plan"`
	Enabled                  bool        `json:"enabled"`
	Trial                    interface{} `json:"trial"`
	NumberOfUsers            int         `json:"numberOfUsers"`
	NumberOfAllowedAddresses int         `json:"numberOfAllowedAddresses"`
	TotalAttachmentSize      int         `json:"totalAttachmentSize"`
	CreatedAt                *time.Time  `json:"createdAt"`
	UpdatedAt                *time.Time  `json:"updatedAt"`
}

type MySpace

type MySpace struct {
	Space          *Space   `json:"space"`
	MyRole         string   `json:"myRole"`
	IsPaymentAdmin bool     `json:"isPaymentAdmin"`
	InvitableRoles []string `json:"invitableRoles"`
	MyPlan         MyPlan   `json:"myPlan"`
}

type NotificationCount

type NotificationCount struct {
	Statuses []*struct {
		MySpace *MySpace `json:"mySpace"`
		Access  *Access  `json:"access"`
		Like    *struct {
			Receive *struct {
				HasUnread  bool `json:"hasUnread"`
				ReadLikeID int  `json:"readLikeId"`
			} `json:"receive"`
		} `json:"like"`
		Unreads *struct {
			TopicIds   []int `json:"topicIds"`
			DMTopicIds []int `json:"dmTopicIds"`
		} `json:"unreads"`
	} `json:"statuses"`
	NotificationSettings *struct {
		FavoriteTopicMobile bool          `json:"favoriteTopicMobile"`
		DoNotDisturb        *DoNotDisturb `json:"doNotDisturb"`
	} `json:"notificationSettings"`
}

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/5/get-notification-status/

type Plan

type Plan struct {
	Key                           string `json:"key"`
	Name                          string `json:"name"`
	LimitNumberOfUsers            int    `json:"limitNumberOfUsers"`
	LimitNumberOfAllowedAddresses int    `json:"limitNumberOfAllowedAddresses"`
	LimitTotalAttachmentSize      int    `json:"limitTotalAttachmentSize"`
}

type Scheduled

type Scheduled struct {
	Enabled bool   `json:"enabled"`
	Start   string `json:"start"`
	End     string `json:"end"`
}

type Space

type Space struct {
	Key      string `json:"key"`
	Name     string `json:"name"`
	Enabled  bool   `json:"enabled"`
	ImageURL string `json:"imageUrl"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL