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

box_fetch() seems to be limited maximum 100 files per directory #47

Closed
ijlyttle opened this issue Nov 2, 2016 · 7 comments
Closed

box_fetch() seems to be limited maximum 100 files per directory #47

ijlyttle opened this issue Nov 2, 2016 · 7 comments

Comments

@ijlyttle
Copy link
Member

ijlyttle commented Nov 2, 2016

Hi,

First to say that this is a lifesaver of a package, thanks!

I am finding a weird and difficult to reproduce error (due to all the side effects), but the upshot is this, if I have a box.com directory with more than 100 files, some of the files are ignored in a box_fetch() operation. The updater will show 1/100, ..., 100/100.

Have you come across this behavior?

Also, I realize there may be a box.com setting that I am not aware of, so I'll try to look around for such a thing.

Thanks for any light you can cast on the situation!

Thanks,

Ian

@ijlyttle
Copy link
Member Author

ijlyttle commented Nov 3, 2016

Did some first digging -

https://docs.box.com/reference#get-folder-info

seems that the call used in box_ls() is limited to 100 by default, but can be extended to 1000 - otherwise needs pagination.

If it's OK, I'll do a provisional PR to set default to 1000, but will ultimately need to use pagination.

Thoughts?

@brendan-r
Copy link
Collaborator

brendan-r commented Nov 6, 2016

Thanks for spotting this --- a PR would be much appreciated!

@ijlyttle
Copy link
Member Author

ijlyttle commented Nov 6, 2016

Will do!

@brendan-r
Copy link
Collaborator

👍 Thanks so much, you've been added as the package's first contributor! (b113ae5).

Agree that pagination is the way to solve this properly, thanks for offering to contribute it. I wrote a very simple pagination function for box_search here. If you think you can adapt/extend/genericize that, by all means do.

I think the improvements probably deserve a test. If you'd like to contribute one, shoot me a mail at foss@brendanrocks.com, and I'll send you the creds for the boxr account I use for testing (don't use your personal box account; it'll overwrite and delete everything several times!). However, if you can't spare the time to write a test of two, don't let that put you off.

@ijlyttle
Copy link
Member Author

ijlyttle commented Nov 7, 2016

  • Glad to contribute, as I've said before, this package is a lifesaver!
  • Will be happy to take a stab at pagination, following your lead.
  • I'll send a separate email to you to start the ball rolling on testing.

@ijlyttle ijlyttle mentioned this issue Jan 4, 2017
@ijlyttle
Copy link
Member Author

ijlyttle commented Feb 5, 2017

fixed in 866f03b

@ijlyttle ijlyttle closed this as completed Feb 5, 2017
@brendan-r
Copy link
Collaborator

🎉

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

No branches or pull requests

2 participants