https://github.com/amacariola/rails-library-api
A test rails API with pagination and serialization using kaminari and jsonapi-serializer
https://github.com/amacariola/rails-library-api
rails-api rest-api ruby-on-rails
Last synced: 2 months ago
JSON representation
A test rails API with pagination and serialization using kaminari and jsonapi-serializer
- Host: GitHub
- URL: https://github.com/amacariola/rails-library-api
- Owner: amacariola
- Created: 2021-05-07T04:21:56.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-12T14:43:57.000Z (about 5 years ago)
- Last Synced: 2026-01-01T14:36:10.241Z (6 months ago)
- Topics: rails-api, rest-api, ruby-on-rails
- Language: Ruby
- Homepage: http://rails-library-api.herokuapp.com/api/v1
- Size: 23.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README
Library-api
a test api for demonstrating pagination and scope usage in Rails
Things you may want to cover:
* Ruby version
* Deployment instructions
* LIBRARY API
1.Query all authors
[haruna]$ curl http://localhost:3000/api/v1/authors | json_pp
2.Query for a single author by id
[haruna]$ curl http://localhost:3000/api/v1/authors/id | json_pp
3.Search for an author using name/genre
[haruna]$ curl http://localhost:3000/api/v1/authors?name=firstname%20lastname | json_pp
[haruna]$ curl http://localhost:3000/api/v1/authors?genres=genres | json_pp
4.Query all books
[haruna]$ curl http://localhost:3000/api/v1/books | json_pp
5.Query a single book by id
[haruna]$ curl http://localhost:3000/api/v1/books/id | json_pp
6.Query for a book using a title
[haruna]$ curl http://localhost:3000/api/v1/books?title=title | json_pp
* Planned Improvements
Using a faster search engines like pg_search or ElasticSearch
Optimization of search queries
Implementation of API keys