cscheid / rgithub

R bindings for the github API
MIT License
70 stars 31 forks source link

WIP: DIY pagination #64

Open krlmlr opened 8 years ago

krlmlr commented 8 years ago

Rough draft for pagination as suggested by @jennybc.

Use case:

p <- list(search.code("difftime user:cran", per_page = 100))
p <- c(p, list(next.page(p[[length(p)]])))
# rinse and repeat
items <- p %>% lapply("[[", "content") %>% lapply("[[", "items") %>% unlist(recursive = FALSE)

This is strictly in a "works for me" state. Possible extensions:

Do we want to follow the approach sketched here?

Fixes #30.

cscheid commented 8 years ago

This one requires a bit more careful of a review, and it's unlikely I'll get to it before thursday or so next week. Ok?

krlmlr commented 8 years ago

This needs a bit of work from me, I just wanted to know if you like the design or if you prefer something completely different.

cscheid commented 8 years ago

Oof, this completely fell off the radar for me. Thanks for the bump. I'll be looking at it this week.

cscheid commented 8 years ago

@jennybc, since you're a user of rgithub and a much better R developer than me, I'd love to hear your thoughts on this PR.

krlmlr commented 7 years ago

Just tried it again for pull requests, still works for me.