Skip to content

Commit fd0397c

Browse files
author
Bhushankumar L
authored
Merge pull request #21 from bhushankumarl/development
Added New Search Methods in Boards API & Cards API
2 parents d75b166 + 07bb2fa commit fd0397c

File tree

5 files changed

+182
-4
lines changed

5 files changed

+182
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
0.0.9
2+
- Added New Search Methods in Boards API & Cards API
3+
14
0.0.8
25
- Upgrade library to latest version.
36
- Search boards using the custom fields

index.d.ts

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,23 @@ declare class TrelloBoard {
2828

2929
searchCardsFilter(boardId: string, filter: string): Promise<any>;
3030

31-
getCustomField(customFieldId: string): Promise<any>;
31+
searchChecklists(boardId: string): Promise<any>;
32+
33+
searchCustomField(boardId: string): Promise<any>;
34+
35+
searchLabels(boardId: string): Promise<any>;
36+
37+
searchLists(boardId: string): Promise<any>;
38+
39+
searchListsFilter(boardId: string, filter: string): Promise<any>;
40+
41+
searchMembers(boardId: string): Promise<any>;
42+
43+
searchMemberships(boardId: string): Promise<any>;
44+
45+
searchPlugins(boardId: string): Promise<any>;
46+
47+
searchCardsByCardId(boardId: string, cardId: string): Promise<any>;
3248

3349
}
3450

@@ -46,6 +62,34 @@ declare class TrelloCard {
4662

4763
setCustomField(cardId: string, customFieldId: string): Promise<any>;
4864

65+
searchActions(cardId: string): Promise<any>;
66+
67+
searchAttachments(cardId: string): Promise<any>;
68+
69+
searchAttachmentByAttachmentId(cardId: string, attachmentId: string): Promise<any>;
70+
71+
searchBoard(cardId: string): Promise<any>;
72+
73+
searchCheckItemStates(cardId: string): Promise<any>;
74+
75+
searchChecklists(cardId: string): Promise<any>;
76+
77+
searchCheckItemByCheckItemId(cardId: string, checkItemId: string): Promise<any>;
78+
79+
searchCustomFieldItems(cardId: string): Promise<any>;
80+
81+
searchList(cardId: string): Promise<any>;
82+
83+
searchMembers(cardId: string): Promise<any>;
84+
85+
searchMembersVoted(cardId: string): Promise<any>;
86+
87+
searchPluginData(cardId: string): Promise<any>;
88+
89+
searchStickers(cardId: string): Promise<any>;
90+
91+
searchStickersByStickerId(cardId: string, stickerId: string): Promise<any>;
92+
4993
}
5094

5195
declare class TrelloChecklist {

lib/resources/Boards.js

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,58 @@ module.exports = TrelloResource.extend({
2222
urlParams: [ 'id', 'filter' ]
2323
}),
2424

25-
getCustomField: trelloMethod({
25+
searchChecklists: trelloMethod({
26+
method: 'GET',
27+
path: '/{id}/checklists',
28+
urlParams: [ 'id' ]
29+
}),
30+
31+
searchCustomField: trelloMethod({
2632
method: 'GET',
2733
path: '/{id}/customFields',
2834
urlParams: [ 'id' ]
35+
}),
36+
37+
searchLabels: trelloMethod({
38+
method: 'GET',
39+
path: '/{id}/customLabels',
40+
urlParams: [ 'id' ]
41+
}),
42+
43+
searchLists: trelloMethod({
44+
method: 'GET',
45+
path: '/{id}/lists',
46+
urlParams: [ 'id' ]
47+
}),
48+
49+
searchListsFilter: trelloMethod({
50+
method: 'GET',
51+
path: '/{id}/lists/{filter}',
52+
urlParams: [ 'id', 'filter' ]
53+
}),
54+
55+
searchMembers: trelloMethod({
56+
method: 'GET',
57+
path: '/{id}/members',
58+
urlParams: [ 'id' ]
59+
}),
60+
61+
searchMemberships: trelloMethod({
62+
method: 'GET',
63+
path: '/{id}/memberships',
64+
urlParams: [ 'id' ]
65+
}),
66+
67+
searchPlugins: trelloMethod({
68+
method: 'GET',
69+
path: '/{id}/plugins',
70+
urlParams: [ 'id' ]
71+
}),
72+
73+
searchCardsByCardId: trelloMethod({
74+
method: 'GET',
75+
path: '/{id}/cards/{idCard}',
76+
urlParams: [ 'id', 'idCard' ]
2977
})
3078

3179
});

lib/resources/Cards.js

Lines changed: 84 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,94 @@ module.exports = TrelloResource.extend({
1010
'create', 'search', 'searchField', 'update', 'del'
1111
],
1212

13-
1413
setCustomField: trelloMethod({
1514
method: 'PUT',
1615
path: '/{idCard}/customField/{idCustomField}/item',
1716
urlParams: [ 'idCard', 'idCustomField' ]
17+
}),
18+
19+
searchActions: trelloMethod({
20+
method: 'GET',
21+
path: '/{id}/actions',
22+
urlParams: [ 'id' ]
23+
}),
24+
25+
searchAttachments: trelloMethod({
26+
method: 'GET',
27+
path: '/{id}/attachments',
28+
urlParams: [ 'id' ]
29+
}),
30+
31+
searchAttachmentByAttachmentId: trelloMethod({
32+
method: 'GET',
33+
path: '/{id}/attachments/{idAttachment}',
34+
urlParams: [ 'id', 'idAttachment' ]
35+
}),
36+
37+
searchBoard: trelloMethod({
38+
method: 'GET',
39+
path: '/{id}/board',
40+
urlParams: [ 'id' ]
41+
}),
42+
43+
searchCheckItemStates: trelloMethod({
44+
method: 'GET',
45+
path: '/{id}/checkItemStates',
46+
urlParams: [ 'id' ]
47+
}),
48+
49+
searchChecklists: trelloMethod({
50+
method: 'GET',
51+
path: '/{id}/checklists',
52+
urlParams: [ 'id' ]
53+
}),
54+
55+
searchCheckItemByCheckItemId: trelloMethod({
56+
method: 'GET',
57+
path: '/{id}/checkItem/{idCheckItem}',
58+
urlParams: [ 'id', 'idCheckItem' ]
59+
}),
60+
61+
searchCustomFieldItems: trelloMethod({
62+
method: 'GET',
63+
path: '/{id}/customFieldItems',
64+
urlParams: [ 'id' ]
65+
}),
66+
67+
searchList: trelloMethod({
68+
method: 'GET',
69+
path: '/{id}/list',
70+
urlParams: [ 'id' ]
71+
}),
72+
73+
searchMembers: trelloMethod({
74+
method: 'GET',
75+
path: '/{id}/members',
76+
urlParams: [ 'id' ]
77+
}),
78+
79+
searchMembersVoted: trelloMethod({
80+
method: 'GET',
81+
path: '/{id}/membersVoted',
82+
urlParams: [ 'id' ]
83+
}),
84+
85+
searchPluginData: trelloMethod({
86+
method: 'GET',
87+
path: '/{id}/pluginData',
88+
urlParams: [ 'id' ]
89+
}),
90+
91+
searchStickers: trelloMethod({
92+
method: 'GET',
93+
path: '/{id}/stickers',
94+
urlParams: [ 'id' ]
95+
}),
96+
97+
searchStickersByStickerId: trelloMethod({
98+
method: 'GET',
99+
path: '/{id}/stickers/{idSticker}',
100+
urlParams: [ 'id' ]
18101
})
19102

20103
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "trello-node-api",
3-
"version": "0.0.8",
3+
"version": "0.0.9",
44
"description": "Trello Node API wrapper",
55
"keywords": [
66
"node-trello",

0 commit comments

Comments
 (0)