Documentation ¶
Overview ¶
Package trello provides a client to interact with the Trello API
Index ¶
Constants ¶
const APIBaseURL = "https://api.trello.com/1"
APIBaseURL is the base URL for the Trello API
const BoardBaseURL = "https://trello.com/b/"
BoardBaseURL is the base URL for Trello boards
Variables ¶
This section is empty.
Functions ¶
func CardsOnListPath ¶
CardsOnListPath returns the path on the Trello API server where cards on a list can be queried
func ListsOnBoardPath ¶
ListsOnBoardPath returns the path on the Trello API server where lists on a board can be queried
func OwnedCardsPath ¶
func OwnedCardsPath() string
OwnedCardsPath returns the path on the Trello API server where a list of owned cards can be queried
func TeardownMockServer ¶
func TeardownMockServer()
TeardownMockServer will remove the mock server so HTTP responses will behave normally
Types ¶
type BackgroundImage ¶
BackgroundImage represents the background image of a Trello board returned via the API
func (*BackgroundImage) UnmarshalJSON ¶
func (b *BackgroundImage) UnmarshalJSON(data []byte) error
UnmarshalJSON converts JSON data into a BackgroundImage
type Board ¶
type Board struct { ID string `json:"id"` Name string `json:"name"` Preferences Preferences `json:"prefs"` }
Board represents a Trello board returned via the API
type Card ¶
type Card struct { ID string `json:"id"` Name string `json:"name"` DueBy *time.Time `json:"due"` URL url.URL `json:"-"` BoardID string `json:"idBoard"` }
Card represents a Trello card returned via the API
func (*Card) UnmarshalJSON ¶
UnmarshalJSON converts JSON data into a Card
type Client ¶
Client is used to interact with the Trello API
func (*Client) CardsOnList ¶
CardsOnList will return the cards on the specified list
func (*Client) ListsOnBoard ¶
ListsOnBoard will return the lists on the specified board
func (*Client) OwnedCards ¶
OwnedCards will return the cards this user is a member of
type MockServer ¶
MockServer allows configuring mock responses from a Trello server
func CreateMockServer ¶
func CreateMockServer(key, token string) *MockServer
CreateMockServer will create and activate a mock server
func (*MockServer) AddFileResponse ¶
func (m *MockServer) AddFileResponse(urlPath, filePath string)
AddFileResponse will return the contents of the specified file when the specified path on the mock server is requested
type Preferences ¶
type Preferences struct {
BackgroundImages []BackgroundImage `json:"backgroundImageScaled"`
}
Preferences represents the preferences for a Trello board returned via the API