Help us shape the future of Go! Take the 2026 Go Developer Survey

quip

package module
v0.0.0-...-205ac98 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2016 License: Apache-2.0 Imports: 8 Imported by: 3

README

go-quip

Quip bindings for Go

Installation

go get should work:

go get github.com/mduvall/go-quip

API Support

The library currently supports the documented endpoints.

Usage/Examples

For usage of go-quip and examples using the library, refer to the godoc page.

A quick rundown:

q := quip.NewClient("access_token")

// Getting recent messages...
rmp := quip.GetRecentMessagesParams{
    ThreadId: "thread_id",
}
messages := q.GetRecentMessages(&rmp)

for _, message := range messages {
    fmt.Println(message.Text)
}

// Creating a new message

nm := quip.NewMessageParams{
    ThreadId: "YLZAAAQV9Py",
    Content:  "Byah!",
}
message := q.NewMessage(&nm)

Documentation

Index

Constants

View Source
const (
	BASE_API_URL = "https://platform.quip.com"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddFolderMembersParams

type AddFolderMembersParams struct {
	FolderId  string
	MemberIds []string
}

type AddMembersParams

type AddMembersParams struct {
	ThreadId  string
	MemberIds []string
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(accessToken string) *Client

func NewClientOAuth

func NewClientOAuth(accessToken string, clientId string, clientSecret string, redirectUri string) *Client

func (*Client) AddFolderMembers

func (q *Client) AddFolderMembers(params *AddFolderMembersParams) *Folder

func (*Client) AddMembers

func (q *Client) AddMembers(params *AddMembersParams) *Thread

func (*Client) EditDocument

func (q *Client) EditDocument(params *EditDocumentParams) *Thread

func (*Client) GetAuthenticatedUser

func (q *Client) GetAuthenticatedUser() *User

func (*Client) GetContacts

func (q *Client) GetContacts() []*User

func (*Client) GetFolder

func (q *Client) GetFolder(params *GetFolderParams) *Folder

func (*Client) GetFolders

func (q *Client) GetFolders(params *GetFoldersParams) []*Folder

func (*Client) GetRecentMessages

func (q *Client) GetRecentMessages(params *GetRecentMessagesParams) []*Message

func (*Client) GetRecentThreads

func (q *Client) GetRecentThreads(params *GetRecentThreadsParams) []*Thread

func (*Client) GetThread

func (q *Client) GetThread(id string) *Thread

func (*Client) GetThreads

func (q *Client) GetThreads(ids []string) []*Thread

func (*Client) GetUser

func (q *Client) GetUser(params *GetUserParams) *User

func (*Client) GetUsers

func (q *Client) GetUsers(params *GetUsersParams) []*User

func (*Client) NewDocument

func (q *Client) NewDocument(params *NewDocumentParams) *Thread

func (*Client) NewFolder

func (q *Client) NewFolder(params *NewFolderParams) *Folder

func (*Client) NewMessage

func (q *Client) NewMessage(params *NewMessageParams) *Message

func (*Client) RemoveFolderMembers

func (q *Client) RemoveFolderMembers(params *RemoveFolderMembersParams) *Folder

func (*Client) RemoveMembers

func (q *Client) RemoveMembers(params *RemoveMembersParams) *Thread

type EditDocumentParams

type EditDocumentParams struct {
	ThreadId  string
	Content   string
	Format    string
	Location  string
	MemberIds []string
}

type Folder

type Folder struct {
	Info struct {
		Id          string
		Title       string
		CreatedUsec int `mapstructure:"created_usec"`
		UpdatedUsec int `mapstructure:"updated_usec"`
		Color       int
		ParentId    string `mapstructure:"parent_id"`
	} `mapstructure:"folder"`

	MemberIds []string `mapstructure:"member_ids"`
	Children  []map[string]string
}

type GetFolderParams

type GetFolderParams struct {
	Id string
}

type GetFoldersParams

type GetFoldersParams struct {
	Ids []string
}

type GetRecentMessagesParams

type GetRecentMessagesParams struct {
	ThreadId       string
	Count          int
	MaxUpdatedUsec int
}

type GetRecentThreadsParams

type GetRecentThreadsParams struct {
	Count          int
	MaxUpdatedUsec int
}

type GetUserParams

type GetUserParams struct {
	Id string
}

type GetUsersParams

type GetUsersParams struct {
	Ids []string
}

type Message

type Message struct {
	AuthorId    string `mapstructure:"author_id"`
	CreatedUsec int    `mapstructure:"created_usec"`
	Id          string
	Text        string
}

type NewDocumentParams

type NewDocumentParams struct {
	Content   string
	Format    string
	Title     string
	MemberIds []string
}

type NewFolderParams

type NewFolderParams struct {
	Title     string
	ParentId  string
	Color     int
	MemberIds []string
}

type NewMessageParams

type NewMessageParams struct {
	ThreadId string
	Content  string
	Silent   bool
}

type RemoveFolderMembersParams

type RemoveFolderMembersParams struct {
	FolderId  string
	MemberIds []string
}

type RemoveMembersParams

type RemoveMembersParams struct {
	ThreadId  string
	MemberIds []string
}

type Thread

type Thread struct {
	ExpandedUserIds []string `mapstructure:"expanded_user_ids"`
	UserIds         []string `mapstructure:"user_ids"`
	SharedFolderIds []string `mapstructure:"shared_folder_ids"`
	Html            string
	Thread          map[string]string
}

type User

type User struct {
	Id              string
	Name            string
	Affinity        float64
	ChatThreadId    string `mapstructure:"chat_thread_id"`
	DesktopFolderId string `mapstructure:"desktop_folder_id"`
	ArchiveFolderId string `mapstructure:"archive_folder_id"`
}

Jump to

Keyboard shortcuts

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