trello

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIv1Board

type APIv1Board struct {
	ID               string      `json:"id"`
	Name             string      `json:"name"`
	ShortLink        string      `json:"shortLink"`
	Desc             string      `json:"desc"`
	DateLastActivity string      `json:"dateLastActivity"`
	DateLastView     string      `json:"dateLastView"`
	URL              string      `json:"url"`
	Lists            []APIv1List `json:"lists"`
}

type APIv1BoardsResponse

type APIv1BoardsResponse []APIv1Board

func GetBoards

func GetBoards(accessKey, accessToken string) (*APIv1BoardsResponse, error)

type APIv1List

type APIv1List struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	BoardID string `json:"idBoard"`
}

type APIv1ListCard

type APIv1ListCard struct {
	// TODO get json fields from lists-cards.json
	ID         string
	Closed     bool
	ListID     string
	BoardID    string
	Name       string
	ShortLink  string
	MemberIDs  []interface{}
	URL        string
	Subscribed bool
}

type APIv1ListCardsResponse

type APIv1ListCardsResponse []APIv1ListCard

func GetListCards

func GetListCards(accessKey, accessToken, listID string) (*APIv1ListCardsResponse, error)

type APIv1MemberNotification

type APIv1MemberNotification struct {
	ID            string                      `json:"id"`
	Type          string                      `json:"type"`
	Date          string                      `json:"date"`
	Data          APIv1MemberNotificationData `json:"data"`
	Unread        bool                        `json:"unread"`
	MemberCreator *APIv1MemberResponse        `json:"memberCreator"`
}

func (APIv1MemberNotification) String

func (n APIv1MemberNotification) String() string

type APIv1MemberNotificationData

type APIv1MemberNotificationData struct {
	Board      *APIv1MemberNotificationDataBoard `json:"board"`
	Card       *APIv1MemberNotificationDataCard  `json:"card"`
	ListBefore *APIv1MemberNotificationDataList  `json:"listBefore"`
	ListAfter  *APIv1MemberNotificationDataList  `json:"listAfter"`
	Text       string                            `json:"text"`
}

type APIv1MemberNotificationDataBoard

type APIv1MemberNotificationDataBoard struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	ShortLink string `json:"shortLink"`
}

type APIv1MemberNotificationDataCard

type APIv1MemberNotificationDataCard struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	IDShort   int    `json:"idShort"`
	ShortLink string `json:"shortLink"`
}

type APIv1MemberNotificationDataList

type APIv1MemberNotificationDataList struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

type APIv1MemberNotificationResponse

type APIv1MemberNotificationResponse []APIv1MemberNotification

func GetNotifications

func GetNotifications(accessKey, accessToken string) (*APIv1MemberNotificationResponse, error)

func (APIv1MemberNotificationResponse) String

String converts the notifications object into a CLI-friendly block of text

type APIv1MemberResponse

type APIv1MemberResponse struct {
	ID              string   `json:"id" yaml:"id"`
	Username        string   `json:"username" yaml:"username"`
	FullName        string   `json:"fullName" yaml:"fullName"`
	Initials        string   `json:"initials" yaml:"initials"`
	URL             string   `json:"url" yaml:"url"`
	Email           string   `json:"email" yaml:"email"`
	BoardIDs        []string `json:"idBoards" yaml:"idBoards"`
	OrganizationIDs []string `json:"idOrganizations" yaml:"idOrganizations"`
	ActivityBlocked bool     `json:"activityBlocked" yaml:"activityBlocked"`
}

func GetAccount

func GetAccount(accessKey, accessToken string) (*APIv1MemberResponse, error)

type Board

type Board struct {
	ID          string `json:"id" yaml:"id"`
	Name        string `json:"name" yaml:"name"`
	AccessKey   string `json:"accessKey" yaml:"accessKey"`
	AccessToken string `json:"accessToken" yaml:"accessToken"`
	Public      bool   `json:"public" yaml:"public"`
}

Board represents a Trello board

func (Board) GetSanitized

func (b Board) GetSanitized() Board

GetSanitized returns a sanitised copy of the Board instance

type Boards

type Boards []Board

Boards is a slice of Board instances

func (Boards) GetSanitized

func (b Boards) GetSanitized() Boards

GetSanitized returns a sanitised copy of the Boards instance

type Config

type Config struct {
	// Boards is the list of boards to monitor
	Boards Boards `json:"boards" yaml:"boards"`
	// AccessKey to be used for all listed boards if their own access token is not defined.
	// This value can be retrieved from the page at https://trello.com/app-key
	AccessKey string `json:"accessKey" yaml:"accessKey"`
	// AccessToken to be used for all listed boards if their own access token is not defined.
	// This value can be retrieved by clicking on Token on the page at https://trello.com/app-key
	AccessToken string `json:"accessToken" yaml:"accessToken"`
}

Config defines the structure of the configuration for the Trello integration

func (Config) GetSanitized

func (c Config) GetSanitized() Config

GetSanitized returns a sanitised copy of the Config instance

Jump to

Keyboard shortcuts

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