package trello

import (
	"github.com/joonasmyhrberg/go-trello"
)

type TrelloConfig struct {
	Key           string
	Token         string
	User          string
	ActionHandler func(action trello.Action)
}

var trelloClient *trello.Client
var trelloConfig TrelloConfig

func Authenticate(config TrelloConfig) error {

	trelloConfig = config

	trello, err := trello.NewAuthClient(config.Key, &config.Token)
	trelloClient = trello

	return err
}

package trello

import (
	"github.com/joonasmyhrberg/go-trello"
)

type TrelloConfig struct {
	Key   string
	Token string
	User  string
}

var trelloClient *trello.Client
var trelloConfig TrelloConfig

func Authenticate(config TrelloConfig) error {

	trelloConfig = config

	trello, err := trello.NewAuthClient(config.Key, &config.Token)
	trelloClient = trello

	return err
}

--- 
+++ 
@@ -5,9 +5,10 @@
 )
 
 type TrelloConfig struct {
-	Key   string
-	Token string
-	User  string
+	Key           string
+	Token         string
+	User          string
+	ActionHandler func(action trello.Action)
 }
 
 var trelloClient *trello.Client
Add ActionHandler to trello config
