Skip to content

aQaTL/go-trello

This branch is 23 commits ahead of VojtechVitek/go-trello:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

480a166 · Aug 25, 2017
Feb 24, 2016
Mar 25, 2017
Feb 24, 2016
Aug 14, 2014
Jan 4, 2016
May 5, 2017
Feb 6, 2016
Oct 22, 2016
May 29, 2017
Aug 24, 2017
Dec 12, 2015
Aug 31, 2016
May 29, 2017
May 29, 2017
Feb 6, 2016
Feb 6, 2016
Dec 12, 2015
Aug 14, 2014
Oct 14, 2016

Repository files navigation

Golang Trello API client

go-trello is a Go client package for accessing the Trello API.

Go package

GoDoc Travis

Example

package main

import (
	"fmt"
	"log"

	"github.com/VojtechVitek/go-trello"
)

func main() {
	// New Trello Client
	appKey := "application-key"
	token := "token"
	trello, err := trello.NewAuthClient(appKey, &token)
	if err != nil {
		log.Fatal(err)
	}

	// User @trello
	user, err := trello.Member("trello")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(user.FullName)

	// @trello Boards
	boards, err := user.Boards()
	if err != nil {
		log.Fatal(err)
	}

	if len(boards) > 0 {
		board := boards[0]
		fmt.Printf("* %v (%v)\n", board.Name, board.ShortUrl)

		// @trello Board Lists
		lists, err := board.Lists()
		if err != nil {
			log.Fatal(err)
		}

		for _, list := range lists {
			fmt.Println("   - ", list.Name)

			// @trello Board List Cards
			cards, _ := list.Cards()
			for _, card := range cards {
				fmt.Println("      + ", card.Name)
			}
		}
	}
}

prints

Trello
* How to Use Trello for Android (https://trello.com/b/9dnaRkNt)
   -  Getting Started
      +  Welcome to Trello! This is a card.
      +  Tap on a card to open it up.
      +  Color-coded labels can be used to classify cards.
      +  Create as many cards as you want. We've got an unlimited supply!
      +  Here is a picture of Taco, our Siberian Husky.
   -  Diving In
      +  Tap and hold this card to drag it to another list.
      +  Tap on the board name to view other sections.
      +  Make as many lists and boards as you need. We'll make more!
   -  Mastering Trello
      +  Finished with a card? Drag it to the top of the board to archive it.
      +  You can reorder lists too.
      +  Invite team members to collaborate on this board.
   -  More Info
      +  Want updates on new features?
      +  You can also view your boards on trello.com

Influenced by

License

Licensed under the Apache License, Version 2.0.

About

Golang client pkg for accessing the Trello API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%