v3

package
v2.1.1+incompatible Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	APIVersion = "v3"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Access

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

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"`
	CreatedAt  *time.Time `json:"createdAt"`
	UpdatedAt  *time.Time `json:"updatedAt"`
}

type AccountsService

type AccountsService service

func (*AccountsService) GetMyFriends deprecated

func (s *AccountsService) GetMyFriends(ctx context.Context, spaceKey, q string, opt *GetMyFriendsOptions) ([]*Account, *shared.Response, error)

GetMyFriends searches accounts.

Deprecated: Use GetMyFrieands in github.com/nulab/go-typetalk/typetalk/v4

type Client

type Client struct {
	Accounts      *AccountsService
	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 GetMyFriendsOptions

type GetMyFriendsOptions struct {
	Offset int `json:"offset,omitempty"`
	Count  int `json:"count,omitempty"`
}

type NotificationsService

type NotificationsService service

func (*NotificationsService) ReadNotification

func (s *NotificationsService) ReadNotification(ctx context.Context, spaceKey string) (*ReadNotificationResult, *shared.Response, error)

ReadNotification marks notifications as read.

Typetalk API docs: https://developer.nulab-inc.com/ja/docs/typetalk/api/3/open-notification

type ReadNotificationResult

type ReadNotificationResult struct {
	Space  *Space  `json:"space"`
	Access *Access `json:"access"`
}

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