{"id":13404013,"url":"https://github.com/bhushankummar/trello-node-api","last_synced_at":"2025-04-22T00:31:59.521Z","repository":{"id":55080506,"uuid":"106947956","full_name":"bhushankummar/trello-node-api","owner":"bhushankummar","description":"Trello NodeJS Wrapper","archived":false,"fork":false,"pushed_at":"2021-01-12T09:09:28.000Z","size":97,"stargazers_count":42,"open_issues_count":9,"forks_count":25,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-08T14:02:24.864Z","etag":null,"topics":["trello","trello-api","trello-board","trello-card","trello-node","trello-typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/bhushankummar.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":["paypal.me/bhushankumarL"]}},"created_at":"2017-10-14T17:24:33.000Z","updated_at":"2024-09-17T20:28:40.000Z","dependencies_parsed_at":"2022-08-14T11:20:59.514Z","dependency_job_id":null,"html_url":"https://github.com/bhushankummar/trello-node-api","commit_stats":null,"previous_names":["bhushankummar/trello-node-api","bhushankumarl/trello-node-api"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhushankummar%2Ftrello-node-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhushankummar%2Ftrello-node-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhushankummar%2Ftrello-node-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bhushankummar%2Ftrello-node-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bhushankummar","download_url":"https://codeload.github.com/bhushankummar/trello-node-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250157881,"owners_count":21384331,"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":["trello","trello-api","trello-board","trello-card","trello-node","trello-typescript"],"created_at":"2024-07-30T19:01:37.708Z","updated_at":"2025-04-22T00:31:59.253Z","avatar_url":"https://github.com/bhushankummar.png","language":"JavaScript","funding_links":["paypal.me/bhushankumarL"],"categories":["JavaScript"],"sub_categories":[],"readme":"# trello-node-api (Trello REST API)\n[![Version](https://img.shields.io/npm/v/trello-node-api.svg)](https://www.npmjs.org/package/trello-node-api)\n[![Build Status](https://travis-ci.org/bhushankumarl/trello-node-api.svg?branch=master)](https://travis-ci.org/bhushankumarl/trello-node-api)\n\nThis API supported Trello's standard REST-style API that accepts/returns JSON requests and Here is the [API reference] (https://developers.trello.com/v1.0/reference)\n\nYou can find [examples here](https://github.com/bhushankumarl/trello-node-api/tree/master/examples). This will help you for faster implmentation of Trello's.\n\n##### It does supports EcmaScript 5, EcmaScript 6,  EcmaScript 8, TypeScript, async-await, Promises, Callback !\n##### It does also supports for AWS Lambda like serverless cloud function call.\n##### It supports pure JSON response.\n##### All methods support Promise and Callback both.\n##### Please Feel free to create Issue for any help !\n##### All developers/contributors are requested to open Pull Request/Merge Request on development branch. Please make sure Test Cases be passed.\n\n## Installation\n```bash\nnpm install trello-node-api --save\n```\n\n## Debugging\n\n```bash\nexport DEBUG=TA:*\n```\n\n## Configuration\n\nSet your API Key and Secret/Oauth Token.\n\n```js\nvar trelloNode = require('trello-node-api')(apiKey, oauthToken);\n```\n\n## Configuration Using TypeScript\n```typescript\nimport * as TrelloNodeAPI from 'trello-node-api';\n\nconst trello = new TrelloNodeAPI();\ntrello.setApiKey('apiKey');\ntrello.setOauthToken('oauthToken');\n```\n\n## Pull Request\n- Contributors can send their Pull Request to `development` branch.\n- Kindly validate test cases \u0026 linting before opening new PR.\n\n## Do you need an expert?\nAre you finding a developer for your world-class product? If yes, please contact here. [Submit your project request here.](https://goo.gl/forms/UofdG5GY5iHMoUWg2)\nOriginally by [Bhushankumar L](mailto:bhushankumar.lilapara@gmail.com).\n\n## Examples\n\n#### [Actions](https://github.com/bhushankumarl/trello-node-api/wiki/Actions-TypeScript)\n\n#### [Boards](https://github.com/bhushankumarl/trello-node-api/wiki/Boards-TypeScript)\n\n#### [Cards](https://github.com/bhushankumarl/trello-node-api/wiki/Cards-TypeScript)\n\n#### [Checklists](https://github.com/bhushankumarl/trello-node-api/wiki/Checklists-TypeScript)\n\n#### [Enterprises](https://github.com/bhushankumarl/trello-node-api/wiki/Enterprises-TypeScript)\n\n#### [Labels](https://github.com/bhushankumarl/trello-node-api/wiki/Labels-TypeScript)\n\n#### [Lists](https://github.com/bhushankumarl/trello-node-api/wiki/Lists-TypeScript)\n\n#### [Members](https://github.com/bhushankumarl/trello-node-api/wiki/Members-TypeScript)\n\n#### [Notifications](https://github.com/bhushankumarl/trello-node-api/wiki/Notifications-TypeScript)\n\n#### [Organizations](https://github.com/bhushankumarl/trello-node-api/wiki/Organizations-TypeScript)\n\n#### [Webhooks](https://github.com/bhushankumarl/trello-node-api/wiki/Webhooks-TypeScript)\n\n### Actions\n#### Delete Action\n```\n    Trello.action.del('ACTION_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Action\n```\n    Trello.action.search('ACTION_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Field Action\n```\n    Trello.action.searchField('ACTION_ID', 'FIELD_NAME').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Update Action\n```\n    var id = 'ACTION_ID'; // REQUIRED\n    var data = {\n        text: 'TEXT' // REQUIRED\n    };\n    Trello.action.update(id, data).then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n### Boards\n#### Create Board\n```\n    var data = {\n        name: 'BOARD_NAME', // REQUIRED\n        defaultLabels: false,\n        defaultLists: false,\n        desc: 'Board description.',\n        idOrganization: 'ORGANIZATION_ID',\n        idBoardSource: 'BOARD_ID',\n        keepFromSource: 'none',\n        powerUps: 'all',\n        prefs_permissionLevel: 'private',\n        prefs_voting: 'disabled',\n        prefs_comments: 'members',\n        prefs_invitations: 'members',\n        prefs_selfJoin: true,\n        prefs_cardCovers: true,\n        prefs_background: 'blue',\n        prefs_cardAging: 'regular'\n    };\n    Trello.board.create(data).then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Delete Board\n```\n    Trello.board.del('BOARD_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Board\n```\n    Trello.board.search('BOARD_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Board Cards\n```\n    Trello.board.searchCards('BOARD_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Board Field\n```\n    var boardId = 'BOARD_ID';\n    var field = 'shortUrl';\n    Trello.board.searchField(boardId, field).then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Board Promise\n```\n    const promises = [];\n    const boardIds = ['BOARD_ID_1', 'BOARD_ID_2'];\n\n    boardIds.forEach((boardId) =\u003e {\n        promises.push(Trello.board.search(boardId));\n    });\n\n    try {\n        const boards = await Promise.all(promises);\n        console.log('boards ', boards);\n    } catch (error) {\n        console.error('[trello]', error);\n    }    \n```\n\n#### Search Board With Filter\n```\n    var boardId = 'BOARD_ID';\n    var fields = {\n        actions: 'all'\n    };\n    Trello.board.search(boardId, fields).then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Cards\n```\n    Trello.board.searchCards('BOARD_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Closed Cards\n```\n    Trello.board.searchCardsFilter('BOARD_ID', 'closed').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Field Board\n```\n    Trello.board.searchField('BOARD_ID', 'FIELD_NAME').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Update Board\n```\n    var id = 'BOARD_ID'; // REQUIRED\n    var data = {\n        name: 'BOARD',\n        desc: 'Board descriptions',\n        closed: false,\n        subscribed: false,\n        idOrganization: 'ORGANIZATION_ID',\n        prefs_permissionLevel: 'private',\n        prefs_selfJoin: true,\n        prefs_cardCovers: true,\n        prefs_invitations: 'members',\n        prefs_voting: 'disabled',\n        prefs_comments: 'members',\n        prefs_background: 'blue',\n        prefs_cardAging: 'regular',\n        prefs_calendarFeedEnabled: false,\n        labelNames_green: 'Test Label 1',\n        labelNames_yellow: 'Test Label 2',\n        labelNames_orange: 'Test Label 3',\n        labelNames_red: 'Test Label 4',\n        labelNames_purple: 'Test Label 5',\n        labelNames_blue: 'Test Label 6'\n    };\n    Trello.board.update(id, data).then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n### Cards\n#### Create Card\n```\n    var data = {\n        name: 'CARD_NAME',\n        desc: 'Card description',\n        pos: 'top',\n        idList: 'LIST_ID', //REQUIRED\n        due: null,\n        dueComplete: false,\n        idMembers: ['MEMBER_ID', 'MEMBER_ID', 'MEMBER_ID'],\n        idLabels: ['LABEL_ID', 'LABEL_ID', 'LABEL_ID'],\n        urlSource: 'https://example.com',\n        fileSource: 'file',\n        idCardSource: 'CARD_ID',\n        keepFromSource: 'attachments,checklists,comments,due,labels,members,stickers'\n    };\n    Trello.card.create(data).then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Delete Card\n```\n    Trello.card.del('CARD_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Card\n```\n    Trello.card.search('CARD_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Field Card\n```\n    Trello.card.searchField('CARD_ID', 'FIELD_NAME').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Update Card\n```\n    var id = 'CARD_ID'; // REQUIRED\n    var data = {\n        name: 'CARD_NAME_TEST',\n        desc: 'Card description',\n        closed: false,\n        idMembers: 'MEMBER_ID,MEMBER_ID,MEMBER_ID',\n        idAttachmentCover: null,\n        idList: 'LIST_ID',\n        idLabels: 'LABEL_ID, LABEL_ID, LABEL_ID',\n        idBoard: false,\n        pos: 'top',\n        due: null,\n        dueComplete: false,\n        subscribed: false\n    };\n    Trello.card.update(id, data).then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n### Checklists\n#### Create Checklist\n```\n    var data = {\n        idCard: 'CARD_ID', // REQUIRED\n        name: 'CHECKLIST_NAME',\n        pos: 1\n    };\n    Trello.checklist.create(data).then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Delete Checklist\n```\n    Trello.checklist.del('CHECKLIST_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Checklist\n```\n    Trello.checklist.search('CHECKLIST_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Field Checklist\n```\n    Trello.checklist.searchField('CHECKLIST_ID', 'FIELD_NAME').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Update Checklist\n```\n    var id = 'CHECKLIST_ID'; // REQUIRED\n    var data = {\n        name: 'CHECKLIST_NAME',\n        pos: 'top'\n    };\n    Trello.checklist.update(id, data).then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n### Enterprises\n#### Search Enterprises\n```\n    Trello.enterprise.search('ENTERPRISE_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n### Labels\n#### Create Label\n```\n    var data = {\n        name: 'LABEL_NAME', // REQUIRED\n        color: 'orange', // REQUIRED\n        idBoard: 'BOARD_ID' // REQUIRED\n    };\n    Trello.label.create(data).then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Delete Label\n```\n    Trello.label.del('LABEL_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Label\n```\n    Trello.label.search('LABEL_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Update Label\n```\n    var id = 'LABEL_ID'; // REQUIRED\n    var data = {\n        name: 'NAME',\n        color: 'orange'\n    };\n    Trello.label.update(id, data).then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n### Lists\n#### Create List\n```\n    var data = {\n        name: 'LIST_NAME', // REQUIRED\n        idBoard: 'BOARD_ID', // REQUIRED\n        idListSource: 'LIST_ID',\n        pos: 'top'\n    };\n    Trello.list.create(data).then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Field List\n```\n    Trello.list.searchField('LIST_ID', 'FIELD_NAME').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search List\n```\n    Trello.list.search('LIST_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Update List\n```\n    var id = 'LIST_ID'; // REQUIRED\n    var data = {\n        name: 'LIST_NAME',\n        closed: false,\n        pos: 'top',\n        subscribed: false\n    };\n    Trello.list.update(id, data).then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n### Members\n#### Search Field Member\n```\n    Trello.member.searchField('MEMBER_ID', 'FIELD_NAME').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Member\n```\n    Trello.member.search('MEMBER_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Member Boards\n```\n    Trello.member.searchBoards('me').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n### Notifications\n#### Search Field Notification\n```\n    Trello.notification.searchField('NOTIFICATION_ID', 'FIELD_NAME').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Notification\n```\n    Trello.notification.search('NOTIFICATION_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Update Notification\n```\n    var id = 'NOTIFICATION_ID'; // REQUIRED\n    var data = {\n        unread: false\n    };\n    Trello.notification.update(id, data).then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n### Organizations\n#### Create Organization\n```\n    var data = {\n        displayName: 'ORGANIZATION_NAME', // REQUIRED\n        desc: 'Organization description',\n        name: 'NAME',\n        website: 'https://example.com'\n    };\n    Trello.organization.create(data).then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Delete Organization\n```\n    Trello.organization.del('ORGANIZATION_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Field Organization\n```\n    Trello.organization.searchField('ORGANIZATION_ID', 'FIELD_NAME').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Organization\n```\n    Trello.organization.search('ORGANIZATION_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Update Organization\n```\n    var id = 'ORGANIZATION_ID'; // REQUIRED\n    var data = {\n        name: 'or123',\n        displayName: 'ORGANIZATION_DISPLAY_NAME',\n        desc: 'Organization descriptions',\n        website: 'https://example.com',\n        prefs_associatedDomain: 'trello.com',\n        prefs_externalMembersDisabled: false,\n        prefs_googleAppsVersion: 1,\n        prefs_boardVisibilityRestrict_org: 'none',\n        prefs_boardVisibilityRestrict_private: 'none',\n        prefs_boardVisibilityRestrict_public: 'none',\n        prefs_orgInviteRestrict: '*.test.com',\n        prefs_permissionLevel: 'public'\n    };\n    Trello.organization.update(id, data).then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n### Webhooks\n#### Create Webhook\n```\n    var data = {\n        description: 'Webhook description',\n        callbackURL: 'https://mycallbackurl.com/', // REQUIRED\n        idModel: 'MODEL_ID', // REQUIRED\n        active: false\n    };\n    Trello.webhook.create(data).then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Delete Webhook\n```\n    Trello.webhook.del('WEBHOOK_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Field Webhook\n```\n    Trello.webhook.searchField('WEBHOOK_ID', 'FIELD_NAME').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Search Webhook\n```\n    Trello.webhook.search('WEBHOOK_ID').then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n#### Update Webhook\n```\n    var id = 'WEBHOOK_ID'; // REQUIRED\n    var data = {\n        displayName: 'ORGANIZATION_DISPLAY_NAME',\n        description: 'Webhook descriptions',\n        callbackURL: 'https://mycallbackurl.com/',\n        idModel: 'MODEL_ID',\n        active: false\n    };\n    Trello.webhook.update(id, data).then(function (response) {\n        console.log('response ', response);\n    }).catch(function (error) {\n        console.log('error', error);\n    });    \n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhushankummar%2Ftrello-node-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhushankummar%2Ftrello-node-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhushankummar%2Ftrello-node-api/lists"}