0.0.4 • Published 6 years ago

trello-api v0.0.4

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

Trello API

This is a wrapper for some of the Trello HTTP API. Please feel free to add any other pieces you need! :)

Usage

Log in to Trello and visit trello.com/app-key to get a token and app key. These need to be supplied when you create the Trello object (see below).

Installation

npm install trello-api --save

Example

import {Trello} from 'trello-api';

let trello = new Trello('MY APPLICATION KEY', 'MY USER TOKEN');

trello.getTokens('MY MEMBER ID')
    .then((res) => console.log(res))
    .catch((err) => console.log(err));

Requests to API endpoints, not supported by this lib yet

import {Trello} from 'trello-api';

let trello = new Trello('MY APPLICATION KEY', 'MY USER TOKEN');

// Get all registered tokens and webhooks
// Url will look like: https://api.trello.com/1/members/me/tokens?webhooks=true&key=YOURKEY&token=YOURTOKEN
trello.request('get', '/1/members/me/tokens', { webhooks: true })
    .then((res) => console.log(res));

Available functions

tokens

方法Path
Trello::getTokensGET /members/{id}/tokens

boards

方法Path
Trello::getBoardsGET /members/{id}/boards
lists
方法Path
Trello::getListsGET /boards/{id}/lists

cards

方法Path
Trello::getCardsGET /boards/{id}/cards
Trello::getCardsOnListGET/lists/{id}/cards

checklists

方法Path
Trello::getChecklistsGET /boards/{id}/checklists
Trello::getChecklistsOnCardsGET/cards/{id}/checklists

actions type=commentCard

方法Path
Trello::getCommentsGET /boards/{id}/actions?filter=commentCard
Trello::getCommentsOnCardsGET/cards/{id}/actions?filter=commentCard

History

0.0.1

  • Version init
0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago