steves / node-jira

A nodejs wrapper for the JIRA REST API
378 stars 169 forks source link

Paging? #70

Open mrjcleaver opened 10 years ago

mrjcleaver commented 10 years ago

Hi - it would be nice if there was an example showing how to page the apis using node-jira, or better still, an iterator with which to fetch the next page.

raksahb commented 10 years ago

Thanks Martin. I don't see any support for paging work logs in the JIRA api. https://docs.atlassian.com/jira/REST/latest/#d2e1819

mrjcleaver commented 10 years ago

Yeah, that's a problem. And my brain is drawing a blank!

Where does paging need to be implemented? In node-jira?

mrjcleaver commented 10 years ago

So... I asked on https://answers.atlassian.com/questions/312567/idempotently-add-missing-worklog-or-page-through-existing-jira-worklogs.

But, maybe https://github.com/extrabacon/rest-collection-stream is what I'm looking for.

Basically I want to treat paging as a collection through which I can iterate. It's too fiddly to handle each fetch, and lots of APIs need paging so we don't want to add it separately to each.