up-bank-api
up-bank-api copied to clipboard
not getting a next link for transactions
await up.transactions.listByAccount("accountID,{pageSize: 10, filterSince:"2020-03-01T12:02:03Z",filterUntil:"2021-11-30T18:02:03Z"});
returns pagesize (10) results, but no next page link.
"links": { "prev": null }
could this be related to recent changed to pagination?
That's an interesting one @bentwonk. It could very well be related to the recent change in pagination. Are you getting previous and next links for any other API calls or is it broken for all of them?
Maybe @IAmMadfly would be able to shed some more light?
up.transactions.list()
On Wed, Dec 22, 2021 at 3:24 PM Nathan Dench @.***> wrote:
That's an interesting one @bentwonk https://github.com/bentwonk. It could very well be related to the recent change in pagination. Are you getting previous and next links for any other API calls or is it broken for all of them?
Maybe @IAmMadfly https://github.com/IAmMadfly would be able to shed some more light?
— Reply to this email directly, view it on GitHub https://github.com/ndench/up-bank-api/issues/19#issuecomment-999276307, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMQ23IMK25HBB36ZBZLA5DUSFHHXANCNFSM5KLPY5AQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
up.transactions.list() has the same problem, so I suspect is broken for all. Cannot test others as the don't produce more than a page of data for me
On Sun, Dec 26, 2021 at 12:51 AM ben palmer @.***> wrote:
up.transactions.list()
On Wed, Dec 22, 2021 at 3:24 PM Nathan Dench @.***> wrote:
That's an interesting one @bentwonk https://github.com/bentwonk. It could very well be related to the recent change in pagination. Are you getting previous and next links for any other API calls or is it broken for all of them?
Maybe @IAmMadfly https://github.com/IAmMadfly would be able to shed some more light?
— Reply to this email directly, view it on GitHub https://github.com/ndench/up-bank-api/issues/19#issuecomment-999276307, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMQ23IMK25HBB36ZBZLA5DUSFHHXANCNFSM5KLPY5AQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
Have you tried rolling back to version 1.4 or 1.3? I don't have time to fix it right now. I might be able to look into it in a couple of weeks.
Are you able to get an example json response from the API so we can write some tests for it?
I might try and write some tests for this library. To check this works. Does it currently use a particular framework?
I wrote these tests a while ago: https://github.com/ndench/up-bank-api/pull/12 But I'm not set on the framework or approach. Open to some feedback!
I've added a CLI command in #21 that you can use to further debug your issue.
Using this, I can confirm that calling up.transactions.list()
works correctly for me and returns the next page link. It also works for other endpoints as well:
yarn run up transactions list
yarn run up accounts list --pageSize=5
Maybe you could clone my PR and have a play with the CLI command to see what the issue is.
Also, if someone has any insight into the ramifications of changing the "module"
option in tsconfig.json
that would be great!
for anyone wondering, downgrading to version 1.3.0 seems to fix this issue for now. Maybe 1.4.0 could work also.
I have added tests on my own fork. And it seems to be working for me. Can someone run my tests with their own UpBank api key and maybe see if it is an issue of not having a long enough list to trigger it?
fork: https://github.com/IAmMadfly/up-bank-api
to run test, put your API KEY in the environment variable TEST_UPBANK_KEY