trello-node-api
trello-node-api copied to clipboard
Board search labels endpoint has changed
board.searchLabels method I think calls an incorrect endpoint
searchLabels: trelloMethod({ method: 'GET', path: '/{id}/customLabels', urlParams: [ 'id' ] }),
path should be '/{id}/labels' base on API documentation
https://developer.atlassian.com/cloud/trello/rest/api-group-boards/#api-boards-id-labels-get
For anyone coming here, while the merge request is not merged, you can do this "ugly solution"
const Trello = require('trello-node-api');
const trelloMethod = require('trello-node-api/lib/TrelloMethod');
const trello = new Trello('abc', 'def');
// This overrides the trello library as the searchLabels is outdated.
trello.board.searchLabels = trelloMethod({
method: 'GET',
path: '/{id}/labels',
urlParams: ['id'],
});