https://github.com/wesleyara/simple-trello
https://github.com/wesleyara/simple-trello
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/wesleyara/simple-trello
- Owner: wesleyara
- License: mit
- Created: 2024-05-18T14:22:50.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-18T17:17:31.000Z (about 1 year ago)
- Last Synced: 2025-02-27T11:34:09.141Z (3 months ago)
- Language: TypeScript
- Size: 94.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Simple TrelloSimple Trello makes easy implementation of trello api in your project.
[](https://github.com/ellerbrock/open-source-badges/)
[](https://opensource.org/licenses/mit-license.php)
[](https://www.npmjs.com/package/simple-trello)
[](http://npm-stat.com/charts.html?package=cz-conventional-changelog&from=2015-08-01) [](#contributors-)
:rocket: How use •
🛠️ Tools •
:pencil: Contributing •
:adult: Thanks •
:page_facing_up: License
# :rocket: How use
Instalation:
```bash
npm install simple-trello
#or
yarn add simple-trello
```# 🛠️ Tools
For start using the `simple-trello` you need to create a trello api key and token. You can create it [here](https://trello.com/power-ups/admin).
First step is create a instance of `SimpleTrello` class passing your key and token.
```javascript
// import libary
import { SimpleTrello } from 'simple-trello';// create instance
const simpleTrello = new SimpleTrello({
key: "your-key",
token: "your-token",
});
```after that you can use the methods to interact with trello api.
## Create card
```javascript
// create new card
const card = await simpleTrello.createCard({ listId, title, description });
```## Get boards
```javascript
// get all boards
const boards = await simpleTrello.getBoards();
```## Get lists
```javascript
// get all lists from board
const lists = await simpleTrello.getLists({ boardId });
```## Get cards
```javascript
// get all cards from list
const cards = await simpleTrello.getCards({ listId });
```# 🧪 Tests
To run the tests you need to create a `.env` file in the root of the project with the following content:
```env
API_KEY=your-key
API_TOKEN=your-token
LIST_ID=your-list-id
BOARD_ID=your-board-id
```After that you can run the tests with the following command:
```bash
npm run test
#or
yarn test
```# 📝 Contributing
Your contribution to the `simple-trello` is essential for the evolution of the project, you can do it as follows:
- Open an [issue](https://github.com/wesleyara/simple-trello/issues) to clear doubts, report bugs or give ideas
- Open a [pull request](https://github.com/wesleyara/simple-trello/pulls) to give ideas for code improvement, implementation of new features and bug fixesThese are just some of the ways you can contribute to the project read the [CONTRIBUTING](https://github.com/wesleyara/simple-trello/blob/main/.github/CONTRIBUTING.md) for more information
# 🧑 Authors
## ✨ Contributors
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
# 📄 License
simple-trello is a open source project licensed as [MIT](LICENSE).