{"id":13414087,"url":"https://github.com/adlio/trello","last_synced_at":"2026-01-16T02:45:34.139Z","repository":{"id":11286564,"uuid":"69080103","full_name":"adlio/trello","owner":"adlio","description":"Trello API wrapper for Go","archived":false,"fork":false,"pushed_at":"2024-04-15T03:55:18.000Z","size":478,"stargazers_count":219,"open_issues_count":8,"forks_count":72,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-09-28T09:05:16.780Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adlio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-24T04:36:10.000Z","updated_at":"2024-09-26T02:44:04.000Z","dependencies_parsed_at":"2024-04-15T05:34:21.550Z","dependency_job_id":"4c9189f2-5243-49f8-89c3-281dd0b789a4","html_url":"https://github.com/adlio/trello","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adlio%2Ftrello","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adlio%2Ftrello/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adlio%2Ftrello/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adlio%2Ftrello/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adlio","download_url":"https://codeload.github.com/adlio/trello/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243642081,"owners_count":20323954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T20:01:57.310Z","updated_at":"2026-01-16T02:45:34.121Z","avatar_url":"https://github.com/adlio.png","language":"Go","readme":"Go Trello API\n================\n\n[![Trello Logo](https://raw.githubusercontent.com/adlio/trello/master/trello-logo.png)](https://www.trello.com)\n\n[![GoDoc](https://godoc.org/github.com/adlio/trello?status.svg)](http://godoc.org/github.com/adlio/trello)\n[![Build Status](https://travis-ci.org/adlio/trello.svg)](https://travis-ci.org/adlio/trello)\n[![Coverage Status](https://coveralls.io/repos/github/adlio/trello/badge.svg?branch=master)](https://coveralls.io/github/adlio/trello?branch=master)\n\nA #golang package to access the [Trello API](https://developers.trello.com/v1.0/reference). Nearly 100% of the\nread-only surface area of the API is covered, as is creation and modification of Cards.\nLow-level infrastructure for features to modify Lists and Boards are easy to add... just not\ndone yet.\n\nPull requests are welcome for missing features.\n\nMy current development focus is documentation, especially enhancing this README.md with more\nexample use cases.\n\n## Installation\n\nThe Go Trello API has been Tested compatible with Go 1.7 on up. Its only dependency is\nthe `github.com/pkg/errors` package. It otherwise relies only on the Go standard library.\n\n```\ngo get github.com/adlio/trello\n```\n\n## Basic Usage\n\nAll interaction starts with a `trello.Client`. Create one with your appKey and token:\n\n```Go\nclient := trello.NewClient(appKey, token)\n```\n\nAll API requests accept a trello.Arguments object. This object is a simple\n`map[string]string`, converted to query string arguments in the API call.\nTrello has sane defaults on API calls. We have a `trello.Defaults()` utility function\nwhich can be used when you desire the default Trello arguments. Internally,\n`trello.Defaults()` is an empty map, which translates to an empty query string.\n\n```Go\nboard, err := client.GetBoard(\"bOaRdID\", trello.Defaults())\nif err != nil {\n  // Handle error\n}\n```\n\n## Client Longevity\n\nWhen getting Lists from Boards or Cards from Lists, the original `trello.Client` pointer\nis carried along in returned child objects. It's important to realize that this enables\nyou to make additional API calls via functions invoked on the objects you receive:\n\n```Go\nclient := trello.NewClient(appKey, token)\nboard, err := client.GetBoard(\"ID\", trello.Defaults())\n\n// GetLists makes an API call to /boards/:id/lists using credentials from `client`\nlists, err := board.GetLists(trello.Defaults())\n\nfor _, list := range lists {\n  // GetCards makes an API call to /lists/:id/cards using credentials from `client`\n  cards, err := list.GetCards(trello.Defaults())\n}\n```\n\n## Get Trello Boards for a User\n\nBoards can be retrieved directly by their ID (see example above), or by asking\nfor all boards for a member:\n\n```Go\nmember, err := client.GetMember(\"usernameOrId\", trello.Defaults())\nif err != nil {\n  // Handle error\n}\n\nboards, err := member.GetBoards(trello.Defaults())\nif err != nil {\n  // Handle error\n}\n```\n\n## Get Trello Lists on a Board\n\n```Go\nboard, err := client.GetBoard(\"bOaRdID\", trello.Defaults())\nif err != nil {\n  // Handle error\n}\n\nlists, err := board.GetLists(trello.Defaults())\nif err != nil {\n  // Handle error\n}\n```\n\n## Get Trello Cards on a Board\n\n```Go\nboard, err := client.GetBoard(\"bOaRdID\", trello.Defaults())\nif err != nil {\n  // Handle error\n}\n\ncards, err := board.GetCards(trello.Defaults())\nif err != nil {\n  // Handle error\n}\n```\n\n## Get Trello Cards on a List\n\n```Go\nlist, err := client.GetList(\"lIsTID\", trello.Defaults())\nif err != nil {\n  // Handle error\n}\n\ncards, err := list.GetCards(trello.Defaults())\nif err != nil {\n  // Handle error\n}\n```\n\n## Creating and deleting a Board\n\nA board can be created or deleted on the `Board` struct for the user whose credentials are being used.\n\n```Go\n  board := trello.NewBoard(\"My bucket list\")\n\n  // POST\n  err := client.CreateBoard(\u0026board, trello.Defaults())\n\n  // DELETE\n  err := board.Delete(trello.Defaults())\n  if err != nil {\n    fmt.Println(err)\n  }\n}\n```\n\n## Adding a new Member to the Board\n\n\n```Go\n  board, err := client.GetBoard(\"bOaRdID\", trello.Defaults())\n  if err != nil {\n    // Handle error\n  }\n\n  member := Member{Email: \"user@example.com\"}\n  _, err := board.AddMember(\u0026member, trello.Defaults()) \n\n  if err != nil {\n    // Handle error\n  }\n```\n\n## Archiving, Unarchiving \u0026 Deleting a Card\n\n```Go\n// archive\nerr := card.Archive()\n\n// unarchive\nerr := card.Unarchive()\n\n// delete\nerr := card.Delete()\n```\n\n## Creating a Card\n\nThe API provides several mechanisms for creating new cards.\n\n### Creating Cards from Scratch on the Client\n\nThis approach requires the most input data on the card:\n\n```Go\ncard := trello.Card{\n  Name: \"Card Name\",\n  Desc: \"Card description\",\n  Pos: 12345.678,\n  IDList: \"iDOfaLiSt\",\n  IDLabels: []string{\"labelID1\", \"labelID2\"},\n}\nerr := client.CreateCard(card, trello.Defaults())\n```\n\n\n### Creating Cards On a List\n\n```Go\nlist, err := client.GetList(\"lIsTID\", trello.Defaults())\nlist.AddCard(\u0026trello.Card{ Name: \"Card Name\", Desc: \"Card description\" }, trello.Defaults())\n```\n\n### Creating a Card by Copying Another Card\n\n```Go\nerr := card.CopyToList(\"listIdNUmber\", trello.Defaults())\n```\n\n## Get Actions on a Board\n\n```Go\nboard, err := client.GetBoard(\"bOaRdID\", trello.Defaults())\nif err != nil {\n  // Handle error\n}\n\nactions, err := board.GetActions(trello.Defaults())\nif err != nil {\n  // Handle error\n}\n```\n\n## Get Actions on a Card\n\n```Go\ncard, err := client.GetCard(\"cArDID\", trello.Defaults())\nif err != nil {\n  // Handle error\n}\n\nactions, err := card.GetActions(trello.Defaults())\nif err != nil {\n  // Handle error\n}\n```\n\n## Rearrange Cards Within a List\n\n```Go\nerr := card.MoveToTopOfList()\nerr = card.MoveToBottomOfList()\nerr = card.SetPos(12345.6789)\n```\n\n\n## Moving a Card to Another List\n\n```Go\nerr := card.MoveToList(\"listIdNUmber\", trello.Defaults())\n```\n\n\n## Card Ancestry\n\nTrello provides ancestry tracking when cards are created as copies of other cards. This package\nprovides functions for working with this data:\n\n```Go\n\n// ancestors will hold a slice of *trello.Cards, with the first\n// being the card's parent, and the last being parent's parent's parent...\nancestors, err := card.GetAncestorCards(trello.Defaults())\n\n// GetOriginatingCard() is an alias for the last element in the slice\n// of ancestor cards.\nultimateParentCard, err := card.GetOriginatingCard(trello.Defaults())\n\n```\n\n## Debug Logging\n\nIf you'd like to see all API calls logged, you can attach a `.Logger` (implementing `Debugf(string, ...interface{})`)\nto your client. The interface for the logger mimics logrus. Example usage:\n\n```Go\nlogger := logrus.New()\nlogger.SetLevel(logrus.DebugLevel)\nclient := trello.NewClient(appKey, token)\nclient.Logger = logger\n```\n","funding_links":[],"categories":["第三方API","Third-party APIs","\u003cspan id=\"第三方api-third-party-apis\"\u003e第三方API Third-party APIs\u003c/span\u003e","第三方 APIs","第三方API`第三方API 汇总`","第三方api","Utility"],"sub_categories":["Advanced Console UIs","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","高級控制台界面","Utility/Miscellaneous","HTTP Clients","查询语","实用程序/Miscellaneous","Fail injection","交流","高级控制台界面"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadlio%2Ftrello","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadlio%2Ftrello","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadlio%2Ftrello/lists"}