File tree Expand file tree Collapse file tree 14 files changed +229
-38
lines changed
Expand file tree Collapse file tree 14 files changed +229
-38
lines changed Original file line number Diff line number Diff line change 1+ language : node_js
2+ node_js :
3+ - " 0.12"
4+ - " 4"
5+ - " 5"
6+ - " 6"
7+ - " 7"
8+ - " 8"
9+ sudo : false
Original file line number Diff line number Diff line change 1+ 0.0.3 December 02, 2017
2+ - Add support for TypeScript
3+ - Add JavaScript examples
4+ - Add TypeScript examples
5+ - Add travis CI
6+
170.0.2 October 15, 2017
28 - Add details to the README.MD
39
Original file line number Diff line number Diff line change 1+ var apiKey = process . env . TRELLO_API_KEY || 'YOUR_API_KEY' ;
2+ var oauthToken = process . env . TRELLO_OAUTH_TOKEN || 'OAUTH_TOKEN' ;
3+
4+ var Trello = require ( '../../../lib/trello-node-api' ) ( apiKey , oauthToken ) ;
5+
6+ var boardRequest = function ( ) {
7+ var data = {
8+ name : 'BOARD' ,
9+ defaultLabels : false ,
10+ defaultLists : false ,
11+ desc : 'Board description.' ,
12+ idOrganization : 'BOARD123456789' ,
13+ idBoardSource : 'BOARD123456789' ,
14+ keepFromSource : 'none' ,
15+ powerUps : 'all' ,
16+ prefs_permissionLevel : 'private' ,
17+ prefs_voting : 'disabled' ,
18+ prefs_comments : 'members' ,
19+ prefs_invitations : 'members' ,
20+ prefs_selfJoin : true ,
21+ prefs_cardCovers : true ,
22+ prefs_background : 'blue' ,
23+ prefs_cardAging : 'regular'
24+ } ;
25+ Trello . board . create ( data ) . then ( function ( response ) {
26+ console . log ( 'response ' , response ) ;
27+ } ) . catch ( function ( error ) {
28+ console . log ( 'error' , error ) ;
29+ } ) ;
30+ } ;
31+
32+ boardRequest ( ) ;
Original file line number Diff line number Diff line change 1+ var apiKey = process . env . TRELLO_API_KEY || 'YOUR_API_KEY' ;
2+ var oauthToken = process . env . TRELLO_OAUTH_TOKEN || 'OAUTH_TOKEN' ;
3+
4+ var Trello = require ( '../../../lib/trello-node-api' ) ( apiKey , oauthToken ) ;
5+
6+ var boardRequest = function ( ) {
7+ var id = 'BOARD_ID' ;
8+ Trello . board . del ( id ) . then ( function ( response ) {
9+ console . log ( 'response ' , response ) ;
10+ } ) . catch ( function ( error ) {
11+ console . log ( 'error' , error ) ;
12+ } ) ;
13+ } ;
14+
15+ boardRequest ( ) ;
Original file line number Diff line number Diff line change 1+ var apiKey = process . env . TRELLO_API_KEY || 'YOUR_API_KEY' ;
2+ var oauthToken = process . env . TRELLO_OAUTH_TOKEN || 'OAUTH_TOKEN' ;
3+
4+ var Trello = require ( '../../../lib/trello-node-api' ) ( apiKey , oauthToken ) ;
5+
6+ var boardRequest = function ( ) {
7+ Trello . board . search ( 'BOARD_ID' ) . then ( function ( response ) {
8+ console . log ( 'response ' , response ) ;
9+ } ) . catch ( function ( error ) {
10+ console . log ( 'error' , error ) ;
11+ } ) ;
12+ } ;
13+
14+ boardRequest ( ) ;
Original file line number Diff line number Diff line change 1+ var apiKey = process . env . TRELLO_API_KEY || 'YOUR_API_KEY' ;
2+ var oauthToken = process . env . TRELLO_OAUTH_TOKEN || 'OAUTH_TOKEN' ;
3+
4+ var Trello = require ( '../../../lib/trello-node-api' ) ( apiKey , oauthToken ) ;
5+
6+ var boardRequest = function ( ) {
7+ Trello . board . searchField ( 'BOARD_ID' , 'FIELD_NAME' ) . then ( function ( response ) {
8+ console . log ( 'response ' , response ) ;
9+ } ) . catch ( function ( error ) {
10+ console . log ( 'error' , error ) ;
11+ } ) ;
12+ } ;
13+
14+ boardRequest ( ) ;
Original file line number Diff line number Diff line change 1+ var apiKey = process . env . TRELLO_API_KEY || 'YOUR_API_KEY' ;
2+ var oauthToken = process . env . TRELLO_OAUTH_TOKEN || 'OAUTH_TOKEN' ;
3+
4+ var Trello = require ( '../../../lib/trello-node-api' ) ( apiKey , oauthToken ) ;
5+
6+ var boardRequest = function ( ) {
7+ var id = 'BOARD_ID' ;
8+ var data = { name : 'BOARD' } ;
9+
10+ Trello . board . update ( id , data ) . then ( function ( response ) {
11+ console . log ( 'response ' , response ) ;
12+ } ) . catch ( function ( error ) {
13+ console . log ( 'error' , error ) ;
14+ } ) ;
15+ } ;
16+
17+ boardRequest ( ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ package-lock = false
Original file line number Diff line number Diff line change 11const apiKey = process . env . TRELLO_API_KEY || 'YOUR_API_KEY' ;
22const oauthToken = process . env . TRELLO_OAUTH_TOKEN || 'OAUTH_TOKEN' ;
3+ import * as TrelloNodeAPI from 'trello-node-api' ;
34
4- let trelloNode = require ( '../../lib/trello-node-api' ) ( apiKey , oauthToken ) ;
5+ const Trello = new TrelloNodeAPI ( ) ;
56
67let boardRequest = async function ( ) {
7- let response = await trelloNode . board . search ( 'ABCD' ) . catch ( error => {
8+ Trello . setApiKey ( apiKey ) ;
9+ Trello . setOauthToken ( oauthToken ) ;
10+ let response = await Trello . board . search ( 'ABCD' ) . catch ( error => {
811 if ( error ) {
912 console . log ( 'error ' , error ) ;
1013 }
You can’t perform that action at this time.
0 commit comments