Grape Pagination

Pagination helpers for Grape.
Alternatives To Grape Pagination
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Api Pagination653329142 years ago32October 26, 202123mitRuby
:page_facing_up: Link header pagination for Rails and Grape APIs.
Grape Pagination13
79 years ago4August 23, 20133mitRuby
Pagination helpers for Grape.
Grape_ape_rails8
8 years ago15June 29, 2015mitRuby
Kaminari Grape72432 years ago4January 25, 2017mitRuby
Kaminari Grape adapter
Her Kaminari5217 years ago3October 09, 20154mitRuby
Kaminari pagination for Her models
Yakports1
9 years agoJavaScript
Grape Client1
7 years ago1mitRuby
Simple access from your client to Grape APIs. Automatically supports: kaminari pagination, network access cache, nested objects, http basic authentication.
Alternatives To Grape Pagination
Select To Compare


Alternative Project Comparisons
Readme

Grape Pagination

Provides helpers for paginating collections in Grape endpoints. Currently only works with with will_paginate, or something that responds to the same paginate interface.

Installation

Add this line to your application's Gemfile:

gem 'grape-pagination'

Usage

Tag your endpoint as supporting pagination params, then use the paginate helper.

class API < Grape::API
  desc 'Gets everything!'
  paginate
  get do
    paginate collection
  end
end

Which would result in a paginated collection and the following headers set:

X-Total: 150
Link: <http://localhost:5000/api/v1/tweets?page=2&per_page=30>; rel="next"

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Popular Grape Projects
Popular Pagination Projects
Popular Frameworks Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Ruby
Pagination
Paginate
Grape