slack-ruby-client icon indicating copy to clipboard operation
slack-ruby-client copied to clipboard

files_list does not paginate

Open rangerscience opened this issue 6 years ago • 5 comments

https://github.com/slack-ruby/slack-ruby-client/blob/6b559c34b22d18910f6ec950c6e2cc2e40239d2a/lib/slack/web/api/endpoints/files.rb#L75-L79

Just looks like the wrapper code was not applied. Or am I missing something?

rangerscience avatar Oct 04 '19 08:10 rangerscience

Also, I don't know where to report this, but it looks like the file info object returned by the files.list end point do not include the shares, while the file info object returned by files.info does.

rangerscience avatar Oct 04 '19 08:10 rangerscience

The pagination wrapper is applied here as long as the API supports pagination, which is when it includes a cursor parameter. So hunt down whether that's the case, and make sure it's properly reflected in https://github.com/slack-ruby/slack-api-ref (which surely needs an update).

Regarding the response in the object, if the slack doc documents something that's not visible in this library, then it's a bug or it wasn't updated automatically as it should have been. Otherwise you should engage Slack support.

dblock avatar Oct 04 '19 20:10 dblock

Fantastic. I'll carve out some time for these steps.

rangerscience avatar Oct 05 '19 01:10 rangerscience

Okay, took a bit, but, here! https://github.com/slack-ruby/slack-ruby-client/pull/301

rangerscience avatar Oct 18 '19 00:10 rangerscience

This API does not paginate like other APIs and takes a page and a count parameter, so it will need a different implementation.

dblock avatar Jan 28 '21 16:01 dblock