Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Board search labels endpoint has changed #27

Open
itdsntwork opened this issue Dec 16, 2020 · 1 comment
Open

Board search labels endpoint has changed #27

itdsntwork opened this issue Dec 16, 2020 · 1 comment

Comments

@itdsntwork
Copy link

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

@ajimix
Copy link

ajimix commented Jan 23, 2021

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'],
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants