trello

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package trello exposes methods that can be used to interact with the Trello REST API. Results returned are AS-IS with no serialization

Trello API Documentation: https://developer.atlassian.com/cloud/trello/guides/rest-api/api-introduction/

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)

Jump to

Keyboard shortcuts

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