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

Page lists flexibility #43

Open
zverok opened this issue Dec 10, 2015 · 0 comments
Open

Page lists flexibility #43

zverok opened this issue Dec 10, 2015 · 0 comments
Milestone

Comments

@zverok
Copy link
Contributor

zverok commented Dec 10, 2015

Currently you can only Infoboxer.wp.category('Argentina') and receive ALL the pages, despite of their count.

Better solution would be something like this:

wiki = Infoboxer.wp
cat = wiki.category('Argentina') # => proxy object
cat.count # => count extraction in one (query=list) request
cat.to_a # all objects extraction
cat.first(5) # only 5 objects extraction in one request with limit=5

wiki.category('Argentina', limit: 20) # => all further requests would be with limit 20, not default 50
wiki.category('Argentina').limit(20).offset(15) # and many of such things
@zverok zverok modified the milestone: 0.2.1 Dec 21, 2015
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

1 participant