<commit_before>// Copyright © 2016 <NAME>
//
// Use of this source code is governed by an MIT licese.
// Details in the LICENSE file.

package trello

import (
	"fmt"
	"time"
)

type Action struct {
	ID              string      `json:"id"`
	IDMemberCreator string      `json:"idMemberCreator"`
	Type            string      `json:"type"`
	Date            time.Time   `json:"date"`
	Data            *ActionData `json:"data,omitempty"`
	MemberCreator   *Member     `json:"memberCreator,omitempty"`
}

type ActionData struct {
	Text           string    `json:"text,omitempty"`
	List           *List     `json:"list,omitempty"`
	Card           *Card     `json:"card,omitempty"`
	Board          *Board    `json:"board,omitempty"`
	Old            *Card     `json:"old,omitempty"`
	ListBefore     *List     `json:"listBefore,omitempty"`
	ListAfter      *List     `json:"listAfter,omitempty"`
	DateLastEdited time.Time `json:"dateLastEdited"`

	CheckItem *CheckItem `json:"checkItem"`
	Checklist *Checklist `json:"checklist"`
}

func (b *Board) GetActions(args Arguments) (actions []*Action, err error) {
	path := fmt.Sprintf("boards/%s/actions", b.ID)
	err = b.client.Get(path, args, &actions)
	return
}

func (l *List) GetActions(args Arguments) (actions []*Action, err error) {
	path := fmt.Sprintf("lists/%s/actions", l.ID)
	err = l.client.Get(path, args, &actions)<commit_msg>Adds CardSource action property to handle copyCard action data.<commit_after>// Copyright © 2016 <NAME>
//
// Use of this source code is governed by an MIT licese.
// Details in the LICENSE file.

package trello

import (
	"fmt"
	"time"
)

type Action struct {
	ID              string      `json:"id"`
	IDMemberCreator string      `json:"idMemberCreator"`
	Type            string      `json:"type"`
	Date            time.Time   `json:"date"`
	Data            *ActionData `json:"data,omitempty"`
	MemberCreator   *Member     `json:"memberCreator,omitempty"`
}

type ActionData struct {
	Text           string    `json:"text,omitempty"`
	List           *List     `json:"list,omitempty"`
	Card           *Card     `json:"card,omitempty"`
	CardSource     *Card     `json:"cardSource,omitempty"`
	Board          *Board    `json:"board,omitempty"`
	Old            *Card     `json:"old,omitempty"`
	ListBefore     *List     `json:"listBefore,omitempty"`
	ListAfter      *List     `json:"listAfter,omitempty"`
	DateLastEdited time.Time `json:"dateLastEdited"`

	CheckItem *CheckItem `json:"checkItem"`
	Checklist *Checklist `json:"checklist"`
}

func (b *Board) GetActions(args Arguments) (actions []*Action, err error) {
	path := fmt.Sprintf("boards/%s/actions", b.ID)
	err = b.client.Get(path, args, &actions)
	return
}

func (l *List) GetActions(args Arguments) (actions []*Action, err error) {
	path := fmt.Sprintf("lists/%s/actions", l.ID)
	err = l.client.Get(path, args, &actions)
{'fraction_non_alphanumeric': 0.1375438596491228, 'fraction_numerical': 0.002807017543859649, 'mean_word_length': 3.1080691642651295, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2385629', 'n_tokens_mistral': 902, 'n_tokens_neox': 888, 'n_words': 236}