kennyma/health_graph — pull request #9 by adammck (2012-05-10 22:27:55+00:00)
Title: Add pagination to acitities feed

This adds `:next_page` and `:previous_page` methods to `FitnessActitiesFeed`, which return new instances of the same class. The existing `:next` and `:previous` accessors work as before, although they're not very useful now that pagination is available.

For example, to fetch every item ever posted:
(This would obviously be a very bad idea in production)

```ruby
feed = @user.fitness_activities
items = []

while feed
items += feed.items
feed = feed.next_page
end
````

This involved a minor refactoring of the test fixtures. Hope you don't mind.

/cc @andrewpbrett