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

files_list does not paginate #299

Open
rangerscience opened this issue Oct 4, 2019 · 5 comments
Open

files_list does not paginate #299

rangerscience opened this issue Oct 4, 2019 · 5 comments
Labels

Comments

@rangerscience
Copy link

rangerscience commented Oct 4, 2019

def files_list(options = {})
options = options.merge(channel: channels_id(options)['channel']['id']) if options[:channel]
options = options.merge(user: users_id(options)['user']['id']) if options[:user]
post('files.list', options)
end

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

@rangerscience
Copy link
Author

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.

@dblock
Copy link
Collaborator

dblock commented Oct 4, 2019

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 dblock added the bug? label Oct 4, 2019
@rangerscience
Copy link
Author

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

@rangerscience
Copy link
Author

Okay, took a bit, but, here!
#301

@dblock
Copy link
Collaborator

dblock commented Jan 28, 2021

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

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

No branches or pull requests

2 participants