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

custom parameters #39

Open
rotsee opened this issue Dec 16, 2016 · 5 comments
Open

custom parameters #39

rotsee opened this issue Dec 16, 2016 · 5 comments

Comments

@rotsee
Copy link

rotsee commented Dec 16, 2016

As far as I can see it's not possible to use e.g. pagination (before) or other parameters when getting cards on a list? Unless I missed something, it would be nice to be able to use all Trello API params

@cleydyr
Copy link

cleydyr commented Jul 26, 2017

There isn't a dedicated method but I think you can work around that limitation by using makeRequest(method, path, options, callback). In your specific case, you could call

trello.makeRequest('get', '/1/list/' + listId + '/cards', {before: '2017-07-26T22:28:42.478Z'}, callback);

But I agree with you that all methods would be ideal.

Regards.

@JensDebergh
Copy link

JensDebergh commented Nov 21, 2017

Upping this but for another reason.

I love this library because its an easy wrapper around the Trello api. The problem starts when you're in need of something more then just plain getBoards.

When you need to add parameters for filtering you have to fallback to makeRequest to do a proper call to the API.

But when we have to resort to makeRequest for more advanced options whats the point of having a wrapper in the first place, we might aswell use the official client.js library?

There is no second parameter options for the wrapper calls, this is only available for makeRequest.

@mgaruccio
Copy link
Contributor

@JensDebergh would a .getBoardsWithExtraParams() that follows the same pattern as the new functions merged in #52 work for your use case?

@JensDebergh
Copy link

JensDebergh commented Nov 21, 2017

For compatibility reasons this looks like the best solution available.
Did you add it for every call available in this library or just the getBoards call?

Best solution would be to rewrite all wrapper function calls to accept an options arguments as second or last parameter (since we can then omit it).

I'm willing to make these changes and commit them but only if this is something that is wanted.

@mgaruccio
Copy link
Contributor

I like the idea of a rewrite, but that's ultimately @norberteder call. Originally it was decided to add extra functions rather than introduce potentially breaking changes but at the time we were only discussing one or two specific functions rather than supporting options for all functions.

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

4 participants