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

Features/add list all files method #7

Closed

Conversation

bunnymatic
Copy link

Add a list_all_files method to Client

Mr Rogers added 2 commits March 4, 2017 12:35
* uses the files/list_folder/continue endpoint with a cursor
* replaces `/delta` from v1 - https://www.dropbox.com/developers/reference/migration-guide
args = { path: path }.merge(opts || {})
request('/files/list_folder', args)
end

# Get the contents of a folder.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure how you feel about this method _list_folder... It seems like the call to request('/files/list_folder') could be pulled out as a little helper since it's now used twice, but maybe not worth the overhead.
So in this second commit, i took that little refactor out.

@bunnymatic
Copy link
Author

I noticed that #1 takes the first step towards this end. I also looked at solving this without modifying the interface, but because the methods return an array of items, the parameter that I need for this recursive refetch (has_more) is lost when the response entries are extracted and wrapped in the Dropbox::Metadata class.

https://github.com/waits/dropbox-sdk-ruby/blob/master/lib/dropbox/client.rb#L131

Have you considered making methods return the rest of the response in someway?

@bunnymatic
Copy link
Author

Kind of looks like I should move to another gem as this stuff hasn't been touched in 7 years. As I am using this branch, it'll likely stick around for a bit on the fork at rcode5, but I'll close this PR cuz it's clearly not going to get brought in.

@bunnymatic bunnymatic closed this Mar 5, 2023
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

Successfully merging this pull request may close these issues.

1 participant