Giter VIP home page Giter VIP logo

go-trello's Introduction

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.

go-trello's People

Contributors

vojtechvitek avatar eparis avatar fiatjaf avatar dennmart avatar gedex avatar lmsilvera avatar frenchben avatar lostsnow avatar

Watchers

James Cloos avatar FrankWang avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.